Merge remote-tracking branch 'origin/NetHack-3.6.0'

(required manual merge in include/config.h)
This commit is contained in:
keni
2018-04-15 13:50:59 -04:00
75 changed files with 5333 additions and 5062 deletions
-6
View File
@@ -1,6 +0,0 @@
PatR <rankin@nethack.org> nethack.rankin <nethack.rankin>
nhmall <mjnh@persona.ca> nethack.allison <nethack.allison>
keni <keni@his.com> keni <keni>
David Cohrs <davecohrs@gmail.com> cohrs <cohrs>
Derek S. Ray <derekray@gmail.com> Derek <derekray@gmail.com>
Alex Kompel <barbos+nethack@gmail.com> Alex Kompel <barbos+droidzebra@gmail.com>
+75 -77
View File
@@ -71,8 +71,8 @@ then added to other platforms.
The 3.2 development team, comprised of Michael Allison, Ken Arromdee, David The 3.2 development team, comprised of Michael Allison, Ken Arromdee, David
Cohrs, Jessie Collet, Steve Creps, Kevin Darcy, Timo Hakulinen, Steve Cohrs, Jessie Collet, Steve Creps, Kevin Darcy, Timo Hakulinen, Steve
Linhart, Dean Luick, Pat Rankin, Eric Smith, Mike Stephenson, Janet Walz, and Linhart, Dean Luick, Pat Rankin, Eric Smith, Mike Stephenson, Janet Walz,
Paul Winner, released version 3.2 in April of 1996. and Paul Winner, released version 3.2 in April of 1996.
Version 3.2 marked the tenth anniversary of the formation of the development 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 team. In a testament to their dedication to the game, all thirteen members
@@ -110,8 +110,8 @@ Kevin Hugo, Steve Linhart, Ken Lorber, Dean Luick, Pat Rankin, Eric Smith,
Mike Stephenson, Janet Walz, and Paul Winner, released 3.3.0 in Mike Stephenson, Janet Walz, and Paul Winner, released 3.3.0 in
December 1999 and 3.3.1 in August of 2000. December 1999 and 3.3.1 in August of 2000.
Version 3.3 offered many firsts. It was the first version to separate race Version 3.3 offered many firsts. It was the first version to separate race
and profession. The Elf class was removed in preference to an elf race, and profession. The Elf class was removed in preference to an elf race,
and the races of dwarves, gnomes, and orcs made their first appearance in 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 the game alongside the familiar human race. Monk and Ranger roles joined
Archeologists, Barbarians, Cavemen, Healers, Knights, Priests, Rogues, Archeologists, Barbarians, Cavemen, Healers, Knights, Priests, Rogues,
@@ -172,102 +172,100 @@ would never be a 3.4.4, 3.5, or 3.5.0 official release version.
In January 2015, preparation began for the release of NetHack 3.6. In January 2015, preparation began for the release of NetHack 3.6.
At the beginning of development for what would eventually get released At the beginning of development for what would eventually get released
as 3.6.0, the development team consisted of Michael Allison, as 3.6.0, the development team consisted of Warwick Allison,
Warwick Allison, Ken Arromdee, David Cohrs, Jessie Collet, Ken Lorber, Michael Allison, Ken Arromdee, David Cohrs, Jessie Collet, Ken Lorber,
Dean Luick, Pat Rankin, Mike Stephenson, Janet Walz, and Paul Winner. Dean Luick, Pat Rankin, Mike Stephenson, Janet Walz, and Paul Winner.
Leading up to the release of 3.6.0 in early 2015, new members Sean Hunt, Leading up to the release of 3.6.0 in early 2015, new members Sean Hunt,
Pasi Kallinen, and Derek S. Ray joined the NetHack development team. Pasi Kallinen, and Derek S. Ray joined the NetHack development team.
In January 2015, preparation began for the release of NetHack 3.6. The 3.6 The 3.6 versions of the game are special in a particular way. Near the end
version merges work done by the development team since the previous release of the development of 3.6.0, one of the significant inspirations for many
with some of the beloved community patches. Many bugs were fixed and some of the humorous and fun features found in the game, author Terry Pratchett,
code was restructured. passed away. The 3.6 versions of the game include 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.
In 2018, several hundred bug fixes for 3.6.0 and some new features
were assembled and released as NetHack 3.6.1. The development team at
the time of release of 3.6.1 consisted 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.
The development team, as well as Steve VanDevender and Kevin Smolkowski The development team, as well as Steve VanDevender and Kevin Smolkowski
ensured that NetHack 3.6 continued to operate on various Unix flavors ensured that NetHack 3.6.1 continued to operate on various Unix flavors
as well as maintaining the X11 interface. as well as maintaining the X11 interface.
Ken Lorber, Haoyang Wang, Pat Rankin, and Dean Luick maintained the port Ken Lorber, Haoyang Wang, Pat Rankin, and Dean Luick maintained the port
of NetHack 3.6 for Mac. of NetHack 3.6.1 for Mac OSX.
Michael Allison, Derek S. Ray, Yitzhak Sapir, Alex Kompel, Dion Nicolaas, Michael Allison, David Cohrs, Barton House, Pasi Kallinen, Alex Kompel,
and David Cohrs maintained the port of NetHack 3.6 for Microsoft Windows. Dion Nicolaas, Derek S. Ray and Yitzhak Sapir maintained the port of
NetHack 3.6.1 for Microsoft Windows.
Pat Rankin attempted to keep the VMS port running for NetHack 3.6, Pat Rankin attempted to keep the VMS port running for NetHack 3.6.1,
hindered by limited access. Kevin Smolkowski has updated and tested it hindered by limited access. Kevin Smolkowski has updated and tested it
for the most recent version of OpenVMS (V8.4 as of this writing) on Alpha for the most recent version of OpenVMS (V8.4 as of this writing) on Alpha
and Integrity (aka Itanium aka IA64) but not VAX. and Integrity (aka Itanium aka IA64) but not VAX.
The 3.6 version of the game is special in a particular way. Near the end of Ray Chason resurrected the msdos port for 3.6.1 and contributed the
the development of 3.6.0, one of the significant inspirations for many of necessary updates to the community at large.
the humorous and fun features found in the game, author Terry Pratchett,
passed away. The 3.6 version of the game includes a tribute to him.
The 3.6 development team consisting of Michael Allison, Warwick Allison, The official NetHack web site is maintained by Ken Lorber at
Ken Arromdee, David Cohrs, Jessie Collet, Sean Hunt, Pasi Kallinen,
Ken Lorber, Dean Luick, Pat Rankin, Derek Ray, Mike Stephenson,
Janet Walz, and Paul Winner released 3.6.1 as a bug fix release in
January 2016.
An official NetHack web site continues to be maintained by Ken Lorber at
http://www.nethack.org/. http://www.nethack.org/.
-- On behalf of the NetHack community, thank you very much once again to
SHOUT-OUTS M. Drew Streib, Pasi Kallinen and Robin Bandy for providing public
NetHack servers at nethack.alt.org and devnull.net and/or for hosting annual
The devteam would like to give a special "shout-out" to thank the generous NetHack tournaments.
people primarily responsible for the public NetHack servers available for
playing the game at nethack.alt.org and devnull.net. In addition to
providing a way for the public to play a game of NetHack from almost
anywhere, they have hosted annual NetHack tournaments for many, many years.
On behalf of the NetHack community, thank you very much to
M. Drew Streib, Pasi Kallinen and Robin Bandy.
- - - - - - - - - - - - - - - - - - - -
From time to time, some depraved individual out there in netland sends a From time to time, some depraved individual out there in netland sends a
particularly intriguing modification to help out with the game. The Gods of particularly intriguing modification to help out with the game. The gods
the Dungeon sometimes make note of the names of the worst of these miscreants of the dungeon sometimes make note of the names of the worst of these
in this, the list of Dungeoneers: miscreants in this, the list of Dungeoneers:
Adam Aronow Janet Walz Nathan Eady Adam Aronow J. Ali Harlow Mikko Juola
Alex Kompel Janne Salmijarvi Norm Meluch Alex Kompel Janet Walz Nathan Eady
Alex Smith Janne Salmijarvi Norm Meluch
Andreas Dorn Jean-Christophe Collet Olaf Seibert Andreas Dorn Jean-Christophe Collet Olaf Seibert
Andy Church Jeff Bailey Pasi Kallinen Andy Church Jeff Bailey Pasi Kallinen
Andy Swanson Jochen Erwied Pat Rankin Andy Swanson Jochen Erwied Pat Rankin
Ari Huttunen John Kallen Paul Winner Ari Huttunen John Kallen Patric Mueller
Barton House John Rupley Pierre Martineau Barton House John Rupley Paul Winner
Benson I. Margulies John S. Bien Ralf Brown Benson I. Margulies John S. Bien Pierre Martineau
Bill Dyer Johnny Lee Ray Chason Bill Dyer Johnny Lee Ralf Brown
Boudewijn Waijers Jon W{tte Richard Addison Boudewijn Waijers Jon W{tte Ray Chason
Bruce Cox Jonathan Handler Richard Beigel Bruce Cox Jonathan Handler Richard Addison
Bruce Holloway Joshua Delahunty Richard P. Hughey Bruce Holloway Joshua Delahunty Richard Beigel
Bruce Mewborne Keizo Yamamoto Rob Menke Bruce Mewborne Keizo Yamamoto Richard P. Hughey
Carl Schelin Ken Arnold Robin Bandy Carl Schelin Ken Arnold Rob Menke
Chris Russo Ken Arromdee Robin Johnson Chris Russo Ken Arromdee Robin Bandy
David Cohrs Ken Lorber Roderick Schertler David Cohrs Ken Lorber Robin Johnson
David Damerell Ken Washikita Roland McGrath David Damerell Ken Washikita Roderick Schertler
David Gentzel Kevin Darcy Ron Van Iwaarden David Gentzel Kevin Darcy Roland McGrath
David Hairston Kevin Hugo Ronnen Miller David Hairston Kevin Hugo Ron Van Iwaarden
Dean Luick Kevin Sitze Ross Brown Dean Luick Kevin Sitze Ronnen Miller
Del Lamb Kevin Smolkowski Sascha Wostmann Del Lamb Kevin Smolkowski Ross Brown
Derek S. Ray Kevin Sweet Scott Bigham Derek S. Ray Kevin Sweet Sascha Wostmann
Deron Meranda Lars Huttar Scott R. Turner Deron Meranda Lars Huttar Scott Bigham
Dion Nicolaas Leon Arnott Sean Hunt Dion Nicolaas Leon Arnott Scott R. Turner
Dylan O'Donnell M. Drew Streib Stephen Spackman Dylan O'Donnell M. Drew Streib Sean Hunt
Eric Backus Malcolm Ryan Stefan Thielscher Eric Backus Malcolm Ryan Stephen Spackman
Eric Hendrickson Mark Gooderum Stephen White Eric Hendrickson Mark Gooderum Stefan Thielscher
Eric R. Smith Mark Modrall Steve Creps Eric R. Smith Mark Modrall Stephen White
Eric S. Raymond Marvin Bressler Steve Linhart Eric S. Raymond Marvin Bressler Steve Creps
Erik Andersen Matthew Day Steve VanDevender Erik Andersen Matthew Day Steve Linhart
Frederick Roeber Merlyn LeRoy Teemu Suikki Frederick Roeber Merlyn LeRoy Steve VanDevender
Gil Neiger Michael Allison Tim Lennan Gil Neiger Michael Allison Teemu Suikki
Greg Laskin Michael Feir Timo Hakulinen Greg Laskin Michael Feir Tim Lennan
Greg Olson Michael Hamel Tom Almy Greg Olson Michael Hamel Timo Hakulinen
Gregg Wonderly Michael Sokolov Tom West Gregg Wonderly Michael Sokolov Tom Almy
Hao-yang Wang Mike Engber Warren Cheung Hao-yang Wang Mike Engber Tom West
Helge Hafting Mike Gallop Warwick Allison Helge Hafting Mike Gallop Warren Cheung
Irina Rempt-Drijfhout Mike Passaretti Yitzhak Sapir Irina Rempt-Drijfhout Mike Passaretti Warwick Allison
Izchak Miller Mike Stephenson Izchak Miller Mike Stephenson Yitzhak Sapir
J. Ali Harlow Mikko Juola
+20 -6
View File
@@ -2,6 +2,7 @@ Boolean options not under specific compile flags (with default values in []):
(You can learn which options exist in your version by checking your current (You can learn which options exist in your version by checking your current
option setting, which is reached via the 'O' cmd.) option setting, which is reached via the 'O' cmd.)
acoustics can your character hear anything [TRUE]
autodescribe describe the terrain under cursor [FALSE] autodescribe describe the terrain under cursor [FALSE]
autodig dig if moving and wielding digging tool [FALSE] autodig dig if moving and wielding digging tool [FALSE]
autoopen walking into a door attempts to open it [TRUE] autoopen walking into a door attempts to open it [TRUE]
@@ -9,23 +10,31 @@ autopickup automatically pick up objects you move over [TRUE]
autoquiver when firing with an empty quiver, select some [FALSE] autoquiver when firing with an empty quiver, select some [FALSE]
suitable inventory weapon to fill the quiver suitable inventory weapon to fill the quiver
BIOS allow the use of IBM ROM BIOS calls [FALSE] BIOS allow the use of IBM ROM BIOS calls [FALSE]
blind your character is permanently blind [FALSE]
bones allow loading bones files [TRUE]
clicklook look at map by clicking right mouse button [FALSE]
cmdassist give help for errors on direction & other commands [TRUE] cmdassist give help for errors on direction & other commands [TRUE]
confirm ask before hitting tame or peaceful monsters [TRUE] confirm ask before hitting tame or peaceful monsters [TRUE]
DECgraphics use DEC/VT line-drawing characters for the dungeon [FALSE] dark_room show floor not in sight in different color [TRUE]
eight_bit_tty send 8-bit characters straight to terminal [FALSE] eight_bit_tty send 8-bit characters straight to terminal [FALSE]
extmenu use a menu for selecting extended commands (#) [FALSE] extmenu use a menu for selecting extended commands (#) [FALSE]
fixinv try to retain the same letter for the same object [TRUE] fixinv try to retain the same letter for the same object [TRUE]
force_invmenu commands asking for inventory item show a menu [FALSE]
goldX when filtering objects by bless/curse state, [FALSE] goldX when filtering objects by bless/curse state, [FALSE]
whether to classify gold as X (unknown) or U (uncursed) whether to classify gold as X (unknown) or U (uncursed)
help print all available info when using the / command [TRUE] help print all available info when using the / command [TRUE]
IBMgraphics use IBM extended characters for the dungeon [FALSE] herecmd_menu show menu of some possible commands when clicking
on yourself or next to you with mouse [FALSE]
ignintr ignore interrupt signal, including breaks [FALSE] ignintr ignore interrupt signal, including breaks [FALSE]
implicit_uncursed omit "uncursed" from inventory, if possible [TRUE] implicit_uncursed omit "uncursed" from inventory, if possible [TRUE]
legacy print introductory message [TRUE] legacy print introductory message [TRUE]
lit_corridor show a dark corridor as lit if in sight [FALSE] lit_corridor show a dark corridor as lit if in sight [FALSE]
lootabc use a/b/c rather than o/i/b when looting [FALSE] lootabc use a/b/c rather than o/i/b when looting [FALSE]
menu_overlay overlay menus on the screen and align to right [TRUE]
mail enable the mail daemon [TRUE] mail enable the mail daemon [TRUE]
mention_walls give feedback when walking against a wall [FALSE]
menu_objsyms show object symbols in menus if it is selectable [FALSE]
menu_overlay overlay menus on the screen and align to right [TRUE]
nudist start your character without armor [FALSE]
null allow nulls to be sent to your terminal [TRUE] null allow nulls to be sent to your terminal [TRUE]
try turning this option off (forcing NetHack to use its own try turning this option off (forcing NetHack to use its own
delay code) if moving objects seem to teleport across rooms delay code) if moving objects seem to teleport across rooms
@@ -36,16 +45,15 @@ pushweapon when wielding a new weapon, put your previously [FALSE]
rawio allow the use of raw I/O [FALSE] rawio allow the use of raw I/O [FALSE]
rest_on_space count the space bar as a rest character [FALSE] rest_on_space count the space bar as a rest character [FALSE]
safe_pet prevent you from (knowingly) attacking your pet(s) [TRUE] safe_pet prevent you from (knowingly) attacking your pet(s) [TRUE]
sanity_check perform data sanity checks [FALSE]
showexp display your accumulated experience points [FALSE] showexp display your accumulated experience points [FALSE]
showrace show yourself by your race rather than by role [FALSE] showrace show yourself by your race rather than by role [FALSE]
silent don't use your terminal's bell sound [TRUE] silent don't use your terminal's bell sound [TRUE]
sortpack group similar kinds of objects in inventory [TRUE] sortpack group similar kinds of objects in inventory [TRUE]
sound enable messages about what your character hears [TRUE]
(note: this has nothing to do with your computer's audio
capabilities, and the game resets it periodically)
sparkle display sparkly effect for resisted magical [TRUE] sparkle display sparkly effect for resisted magical [TRUE]
attacks (e.g. fire attack on fire-resistant monster) attacks (e.g. fire attack on fire-resistant monster)
standout use standout mode for --More-- on messages [FALSE] standout use standout mode for --More-- on messages [FALSE]
status_updates update the status lines [TRUE]
time display elapsed game time, in moves [FALSE] time display elapsed game time, in moves [FALSE]
tombstone print tombstone when you die [TRUE] tombstone print tombstone when you die [TRUE]
toptenwin print topten in a window rather than stdout [FALSE] toptenwin print topten in a window rather than stdout [FALSE]
@@ -54,6 +62,8 @@ travel enable the command to travel to a map location via [TRUE]
use_darkgray use bold black instead of blue for black glyphs. [TRUE] use_darkgray use bold black instead of blue for black glyphs. [TRUE]
use_inverse display detected monsters in highlighted manner [FALSE] use_inverse display detected monsters in highlighted manner [FALSE]
verbose print more commentary during the game [TRUE] verbose print more commentary during the game [TRUE]
whatis_menu show menu when getting a map location [FALSE]
whatis_moveskip skip same glyphs when getting a map location [FALSE]
There are further boolean options controlled by compilation flags. There are further boolean options controlled by compilation flags.
@@ -74,6 +84,7 @@ showscore display your approximate accumulated score [FALSE]
Boolean options if TEXTCOLOR was set at compile time: Boolean options if TEXTCOLOR was set at compile time:
color use different colors for objects on screen [TRUE for micros] color use different colors for objects on screen [TRUE for micros]
hilite_pet display pets in a highlighted manner [FALSE] hilite_pet display pets in a highlighted manner [FALSE]
hilite_pile display item piles in a highlighted manner [FALSE]
Boolean option if TIMED_DELAY was set at compile time (tty interface only): Boolean option if TIMED_DELAY was set at compile time (tty interface only):
timed_delay on unix and VMS, use a timer instead of sending [TRUE] timed_delay on unix and VMS, use a timer instead of sending [TRUE]
@@ -92,6 +103,9 @@ preload_tiles control whether tiles get pre-loaded into RAM at [TRUE]
the start of the game. Doing so enhances performance the start of the game. Doing so enhances performance
of the tile graphics, but uses more memory. of the tile graphics, but uses more memory.
Boolean option if TTY_TILES_ESCCODES was set at compile time (tty only):
vt_tiledata insert extra data escae code markers into output [FALSE]
Any Boolean option can be negated by prefixing it with a '!' or 'no'. Any Boolean option can be negated by prefixing it with a '!' or 'no'.
+5
View File
@@ -1 +1,6 @@
Guidebook Guidebook
Guidebook.aux
Guidebook.log
Guidebook.pdf
Guidebook.synctex.gz
+128 -110
View File
@@ -1,11 +1,11 @@
.\" $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.241 $ $NHDT-Date: 1512473628 2017/12/05 11:33:48 $ .\" $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.251 $ $NHDT-Date: 1523736800 2018/04/14 20:13:20 $
.ds h0 "NetHack Guidebook .ds h0 "NetHack Guidebook
.ds h1 .ds h1
.ds h2 % .ds h2 %
.ds vr "NetHack 3.6 .ds vr "NetHack 3.6
.ds f0 "\*(vr .ds f0 "\*(vr
.ds f1 .ds f1
.ds f2 "February 22, 2016 .ds f2 "April 14, 2018
.\" labeled paragraph start (should be part of tmac.n, but I don't want to .\" labeled paragraph start (should be part of tmac.n, but I don't want to
.\" make changes to that file) .\" make changes to that file)
.\" .PS word .\" .PS word
@@ -1244,7 +1244,7 @@ On other systems, if typing `Alt' plus another key transmits a
two character sequence consisting of an \fBEscape\fP two character sequence consisting of an \fBEscape\fP
followed by the other key, you may set the followed by the other key, you may set the
.op altmeta .op altmeta
option to have nethack combine them into meta+key. option to have NetHack combine them into meta+key.
.lp M-? .lp M-?
#? (not supported by all platforms) #? (not supported by all platforms)
.lp M-2 .lp M-2
@@ -1303,20 +1303,17 @@ If the
.op number_pad .op number_pad
option is on, some additional letter commands are available: option is on, some additional letter commands are available:
.lp h .lp h
Help menu: display one of several help texts available, like ``?''. #help
.lp j .lp j
Jump to another location. Same as ``#jump'' or ``M-j''. #jump
.lp k .lp k
Kick something (usually a door). Same as `^D'. #kick
.lp l .lp l
Loot a box or bag on the floor beneath you, or the saddle #loot
from a steed standing next to you. Same as ``#loot'' or ``M-l''.
.lp N .lp N
Name a monster, an individual object, or a type of object. Same #name
as ``#name'' (or ``M-n'') which is the same as the `C'
command.
.lp u .lp u
Untrap a trap, door, or chest. Same as ``#untrap'' or ``M-u''. #untrap
.hn 1 .hn 1
Rooms and corridors Rooms and corridors
@@ -1367,7 +1364,7 @@ complete all of the levels according to the traditional rules of
Sokoban. Some allowances are permitted in case the player gets stuck; Sokoban. Some allowances are permitted in case the player gets stuck;
however, they will lower your luck. however, they will lower your luck.
.hn 2 .hn 2
Stairs (`<', `>') Stairs and ladders (`<', `>')
.pg .pg
In general, each level in the dungeon will have a staircase going up In general, each level in the dungeon will have a staircase going up
(`<') to the previous level and another going down (`>') to the next (`<') to the previous level and another going down (`>') to the next
@@ -1395,8 +1392,6 @@ and some other monsters will follow along if they're close enough when
you travel up or down stairs, and occasionally one of these creatures you travel up or down stairs, and occasionally one of these creatures
will displace you during the climb. When that occurs, the pet or other 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. monster will arrive on the staircase and you will end up nearby.
.hn 2
Ladders (`<', `>')
.pg .pg
Ladders serve the same purpose as staircases, and the two types of Ladders serve the same purpose as staircases, and the two types of
inter-level connections are nearly indistinguishable during game play. inter-level connections are nearly indistinguishable during game play.
@@ -3049,67 +3044,68 @@ Where to align or place the message window (top, bottom, left, or right)
.lp align_status .lp align_status
Where to align or place the status window (top, bottom, left, or right). Where to align or place the status window (top, bottom, left, or right).
.lp ascii_map .lp ascii_map
NetHack should display an ascii character map if it can. If NetHack can, it should display an ascii character map if it can.
.lp color .lp color
NetHack should display color if it can for different monsters, If NetHack can, it should display color if it can for different monsters,
objects, and dungeon features objects, and dungeon features.
.lp eight_bit_tty .lp eight_bit_tty
NetHack should pass eight-bit character values (for example, specified with the If NetHack can, it should pass eight-bit character values (for example,
specified with the
.op traps .op traps
option) straight through to your terminal (default off). option) straight through to your terminal (default off).
.lp font_map .lp font_map
NetHack should use a font by the chosen name for the map window. if NetHack can, it should use a font by the chosen name for the map window.
.lp font_menu .lp font_menu
NetHack should use a font by the chosen name for menu windows. If NetHack can, it should use a font by the chosen name for menu windows.
.lp font_message .lp font_message
NetHack should use a font by the chosen name for the message window. If NetHack can, it should use a font by the chosen name for the message window.
.lp font_status .lp font_status
NetHack should use a font by the chosen name for the status window. If NetHack can, it should use a font by the chosen name for the status window.
.lp font_text .lp font_text
NetHack should use a font by the chosen name for text windows. If NetHack can, it should use a font by the chosen name for text windows.
.lp font_size_map .lp font_size_map
NetHack should use this size font for the map window. If NetHack can, it should use this size font for the map window.
.lp font_size_menu .lp font_size_menu
NetHack should use this size font for menu windows. If NetHack can, it should use this size font for menu windows.
.lp font_size_message .lp font_size_message
NetHack should use this size font for the message window. If NetHack can, it should use this size font for the message window.
.lp font_size_status .lp font_size_status
NetHack should use this size font for the status window. If NetHack can, it should use this size font for the status window.
.lp font_size_text .lp font_size_text
NetHack should use this size font for text windows. If NetHack can, it should use this size font for text windows.
.lp fullscreen .lp fullscreen
NetHack should try and display on the entire screen rather than in a window. If NetHack can, it should try and display on the entire screen rather than in a window.
.lp large_font .lp large_font
NetHack should use a large font. If NetHack can, it should use a large font.
.lp map_mode .lp map_mode
NetHack should display the map in the manner specified. If NetHack can, it should display the map in the manner specified.
.lp mouse_support .lp mouse_support
Allow use of the mouse for input and travel. Allow use of the mouse for input and travel.
.lp player_selection .lp player_selection
NetHack should pop up dialog boxes, or use prompts for character selection. If NetHack can, it should pop up dialog boxes, or use prompts for character selection.
.lp popup_dialog .lp popup_dialog
NetHack should pop up dialog boxes for input. If NetHack can, it should pop up dialog boxes for input.
.lp preload_tiles .lp preload_tiles
NetHack should preload tiles into memory. If NetHack can, it should preload tiles into memory.
For example, in the protected mode MSDOS version, control whether tiles For example, in the protected mode MSDOS version, control whether tiles
get pre-loaded into RAM at the start of the game. Doing so 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). enhances performance of the tile graphics, but uses more memory. (default on).
Cannot be set with the `O' command. Cannot be set with the `O' command.
.lp scroll_amount .lp scroll_amount
NetHack should scroll the display by this number of cells If NetHack can, it should scroll the display by this number of cells
when the hero reaches the scroll_margin. when the hero reaches the scroll_margin.
.lp scroll_margin .lp scroll_margin
NetHack should scroll the display when the hero or cursor If NetHack can, it should scroll the display when the hero or cursor
is this number of cells away from the edge of the window. is this number of cells away from the edge of the window.
.lp selectsaved .lp selectsaved
NetHack should display a menu of existing saved games for the player to 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. choose from at game startup, if it can. Not all ports support this option.
.lp softkeyboard .lp softkeyboard
Display an onscreen keyboard. Handhelds are most likely to support this option. Display an onscreen keyboard. Handhelds are most likely to support this option.
.lp splash_screen .lp splash_screen
NetHack should display an opening splash screen when it starts up (default yes). If NetHack can, it should display an opening splash screen when it starts up (default yes).
.lp tiled_map .lp tiled_map
NetHack should display a tiled map if it can. If NetHack can, it should display a tiled map if it can.
.lp tile_file .lp tile_file
Specify the name of an alternative tile file to override the default. Specify the name of an alternative tile file to override the default.
.lp tile_height .lp tile_height
@@ -3119,15 +3115,15 @@ Specify the preferred width of each tile in a tile capable port
.lp use_darkgray .lp use_darkgray
Use bold black instead of blue for black glyphs (TTY only). Use bold black instead of blue for black glyphs (TTY only).
.lp use_inverse .lp use_inverse
NetHack should display inverse when the game specifies it. If NetHack can, it should display inverse when the game specifies it.
.lp vary_msgcount .lp vary_msgcount
NetHack should display this number of messages at a time in If NetHack can, it should display this number of messages at a time in
the message window. the message window.
.lp windowcolors .lp windowcolors
NetHack should display windows with the specified foreground/background If NetHack can, it should display windows with the specified foreground/background
colors if it can. colors if it can.
.lp wraptext .lp wraptext
NetHack port should wrap long lines of text if they don't fit in If NetHack can, it should wrap long lines of text if they don't fit in
the visible area of the window. the visible area of the window.
.hn 2 .hn 2
Platform-specific Customization options Platform-specific Customization options
@@ -3144,7 +3140,7 @@ On Amiga, this option controls whether typing `Alt' plus another key
functions as a meta-shift for that key (default on). functions as a meta-shift for that key (default on).
.lp altmeta .lp altmeta
On other (non-Amiga) systems where this option is available, it can be 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 set to tell NetHack to convert a two character sequence beginning with
ESC into a meta-shifted version of the second character (default off). ESC into a meta-shifted version of the second character (default off).
.lp "" .lp ""
This conversion is only done for commands, not for other input prompts. This conversion is only done for commands, not for other input prompts.
@@ -3152,7 +3148,7 @@ Note that typing one or more digits as a count prefix prior to a
command--preceded by \fBn\fP if the command--preceded by \fBn\fP if the
.op number_pad .op number_pad
option is set--is also subject to this conversion, so attempting to option is set--is also subject to this conversion, so attempting to
abort the count by typing ESC will leave nethack waiting for another abort the count by typing ESC will leave NetHack waiting for another
character to complete the two character sequence. Type a second ESC to character to complete the two character sequence. Type a second ESC to
finish cancelling such a count. At other prompts a single ESC suffices. finish cancelling such a count. At other prompts a single ESC suffices.
.lp "BIOS " .lp "BIOS "
@@ -4224,16 +4220,6 @@ successors originally by \fBDaniel Thaler\fP and then by \fBAlex Smith\fP,
and Dynahack by \fBTung Nguyen\fP. Some of those variants continue to be and Dynahack by \fBTung Nguyen\fP. Some of those variants continue to be
developed, maintained, and enjoyed by the community to this day. developed, maintained, and enjoyed by the community to this day.
.pg .pg
At the beginning of development for what would eventually get released
as 3.6.0, the development team consisted of \fBWarwick Allison\fP,
\fBMichael Allison\fP, \fBKen Arromdee\fP,
\fBDavid Cohrs\fP, \fBJessie Collet\fP,
\fBKen Lorber\fP, \fBDean Luick\fP, \fBPat Rankin\fP,
\fBMike Stephenson\fP, \fBJanet Walz\fP, and \fBPaul Winner\fP.
Leading up to the release of 3.6.0 in early 2015, new members
\fBSean Hunt\fP, \fBPasi Kallinen\fP, and \fBDerek S. Ray\fP
joined the NetHack development team.
.pg
In September 2014, an interim snapshot of the code under development was In September 2014, an interim snapshot of the code under development was
released publicly by other parties. Since that code was a work-in-progress released publicly by other parties. Since that code was a work-in-progress
and had not gone through the process of debugging it as a suitable release, and had not gone through the process of debugging it as a suitable release,
@@ -4243,43 +4229,65 @@ was posted on the devteam's official nethack.org website to that effect,
stating that there would never be a 3.4.4, 3.5, or 3.5.0 official release stating that there would never be a 3.4.4, 3.5, or 3.5.0 official release
version. version.
.pg .pg
In November 2014, preparation began for the release of NetHack 3.6. The 3.6 In January 2015, preparation began for the release of NetHack 3.6.
version merges work done by the development team since the previous release .pg
with some of the beloved community patches. Many bugs were fixed and a At the beginning of development for what would eventually get released
large amount of code was restructured. as 3.6.0, the development team consisted of \fBWarwick Allison\fP,
\fBMichael Allison\fP, \fBKen Arromdee\fP,
\fBDavid Cohrs\fP, \fBJessie Collet\fP,
\fBKen Lorber\fP, \fBDean Luick\fP, \fBPat Rankin\fP,
\fBMike Stephenson\fP, \fBJanet Walz\fP, and \fBPaul Winner\fP.
In early 2015, ahead of the release of 3.6.0, new members
\fBSean Hunt\fP, \fBPasi Kallinen\fP, and \fBDerek S. Ray\fP
joined the NetHack development team.
.pg
The 3.6 versions of the game are special in a particular way. Near the end of
the development of 3.6.0, one of the significant inspirations for many of
the humorous and fun features found in the game, author Terry Pratchett,
passed away. The 3.6 versions of the game include a tribute to him.
.pg
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.
.pg
In 2018, several hundred bug fixes for 3.6.0 and some new features
were assembled and released as NetHack 3.6.1. The development team at
the time of release of 3.6.1 consisted of
\fBWarwick Allison\fP,\fBMichael Allison\fP, \fBKen Arromdee\fP,
\fBDavid Cohrs\fP, \fBJessie Collet\fP, \fBPasi Kallinen\fP,
\fBKen Lorber\fP, \fBDean Luick\fP, \fBPatric Mueller\fP,
\fBPat Rankin\fP, \fBDerek S. Ray\fP, \fBAlex Smith\fP,
\fBMike Stephenson\fP, \fBJanet Walz\fP, and \fBPaul Winner\fP.
.pg .pg
The development team, as well as \fBSteve VanDevender\fP and The development team, as well as \fBSteve VanDevender\fP and
\fBKevin Smolkowski\fP ensured that NetHack 3.6 continued to operate on \fBKevin Smolkowski\fP, ensured that NetHack 3.6 continued to operate on
various Unix flavors and maintained the X11 interface. various Unix flavors and maintained the X11 interface.
.pg .pg
\fBKen Lorber\fP, \fBHaoyang Wang\fP, \fBPat Rankin\fP, and \fBDean Luick\fP \fBKen Lorber\fP, \fBHaoyang Wang\fP, \fBPat Rankin\fP, and \fBDean Luick\fP
maintained the port of NetHack 3.6 for Mac. maintained the port of NetHack 3.6 for Mac OSX.
.pg .pg
\fBMichael Allison\fP, \fBDerek S. Ray\fP, \fBYitzhak Sapir\fP, \fBMichael Allison\fP, \fBDavid Cohrs\fP, \fBBarton House\fP,
\fBAlex Kompel\fP, and \fBDion Nicolaas\fP maintained the port of \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. NetHack 3.6 for Microsoft Windows.
.pg .pg
The 3.6 development team consisting of \fBPat Rankin\fP attempted to keep the VMS port running for NetHack 3.6.1,
\fBMichael Allison\fP, \fBWarwick Allison\fP, \fBKen Arromdee\fP, hindered by limited access. \fBKevin Smolkowski\fP has updated and tested it
\fBDavid Cohrs\fP, \fBJessie Collet\fP, \fBSean Hunt\fP, for the most recent version of OpenVMS (V8.4 as of this writing) on Alpha
\fBPasi Kallinen\fP, \fBKen Lorber\fP, \fBDean Luick\fP, \fBPat Rankin\fP, and Integrity (aka Itanium aka IA64) but not VAX.
\fBMike Stephenson\fP, \fBDerek S. Ray\fP, \fBJanet Walz\fP, and .pg
\fBPaul Winner\fP \fBRay Chason\fP resurrected the msdos port for 3.6.1 and contributed the
released 3.6.1 as a bug fix release in January 2016. necessary updates to the community at large.
.pg .pg
The official NetHack web site is maintained by \fBKen Lorber\fP at http://www.nethack.org/. The official NetHack web site is maintained by \fBKen Lorber\fP at http://www.nethack.org/.
.pg .pg
.hn 2 .hn 2
SHOUT-OUTS SPECIAL THANKS
.pg .pg
The devteam would like to give a special "shout-out" to thank the generous On behalf of the NetHack community, thank you very much once
people primarily responsible for the public NetHack servers available for again to \fBM. Drew Streib\fP, \fBPasi Kallinen\fP and \fBRobin Bandy\fP
playing the game at nethack.alt.org and devnull.net. In addition to providing for providing public NetHack servers at nethack.alt.org and devnull.net
a way for the public to play a game of NetHack from almost anywhere, they and/or for hosting annual NetHack tournaments.
have hosted annual NetHack tournaments for many, many years.
.pg
On behalf of the NetHack community, thank you very much to
\fBM. Drew Streib\fP, \fBPasi Kallinen\fP and \fBRobin Bandy\fP.
.pg .pg
- - - - - - - - - - - - - - - - - - - -
.pg .pg
@@ -4292,36 +4300,46 @@ in this, the list of Dungeoneers:
center; center;
c c c. c c c.
.\"TABLE_START .\"TABLE_START
Adam Aronow Erik Andersen Kevin Sitze Ray Chason Adam Aronow J. Ali Harlow Mikko Juola
Alex Kompel Frederick Roeber Kevin Smolkowski Richard Addison Alex Kompel Janet Walz Nathan Eady
Alex Smith Gil Neiger Kevin Sweet Richard Beigel Alex Smith Janne Salmijarvi Norm Meluch
Andreas Dorn Greg Laskin Lars Huttar Richard P. Hughey Andreas Dorn Jean-Christophe Collet Olaf Seibert
Andy Church Greg Olson Leon Arnott Rob Menke Andy Church Jeff Bailey Pasi Kallinen
Andy Swanson Gregg Wonderly M. Drew Streib Robin Bandy Andy Swanson Jochen Erwied Pat Rankin
Ari Huttunen Hao-yang Wang Malcolm Ryan Robin Johnson Ari Huttunen John Kallen Patric Mueller
Barton House Helge Hafting Mark Gooderum Roderick Schertler Barton House John Rupley Paul Winner
Benson I. Margulies Irina Rempt-Drijfhout Mark Modrall Roland McGrath Benson I. Margulies John S. Bien Pierre Martineau
Bill Dyer Izchak Miller Marvin Bressler Ron Van Iwaarden Bill Dyer Johnny Lee Ralf Brown
Boudewijn Waijers J. Ali Harlow Matthew Day Ronnen Miller Boudewijn Waijers Jon W{tte Ray Chason
Bruce Cox Janet Walz Merlyn LeRoy Ross Brown Bruce Cox Jonathan Handler Richard Addison
Bruce Holloway Janne Salmijarvi Michael Allison Sascha Wostmann Bruce Holloway Joshua Delahunty Richard Beigel
Bruce Mewborne Jean-Christophe Collet Michael Feir Scott Bigham Bruce Mewborne Keizo Yamamoto Richard P. Hughey
Carl Schelin Jeff Bailey Michael Hamel Scott R. Turner Carl Schelin Ken Arnold Rob Menke
Chris Russo Jochen Erwied Michael Sokolov Sean Hunt Chris Russo Ken Arromdee Robin Bandy
David Cohrs John Kallen Mike Engber Stephen Spackman David Cohrs Ken Lorber Robin Johnson
David Damerell John Rupley Mike Gallop Stefan Thielscher David Damerell Ken Washikita Roderick Schertler
David Gentzel John S. Bien Mike Passaretti Stephen White David Gentzel Kevin Darcy Roland McGrath
David Hairston Johnny Lee Mike Stephenson Steve Creps David Hairston Kevin Hugo Ron Van Iwaarden
Dean Luick Jon W{tte Mikko Juola Steve Linhart Dean Luick Kevin Sitze Ronnen Miller
Del Lamb Jonathan Handler Nathan Eady Steve VanDevender Del Lamb Kevin Smolkowski Ross Brown
Derek S. Ray Joshua Delahunty Norm Meluch Teemu Suikki Derek S. Ray Kevin Sweet Sascha Wostmann
Deron Meranda Keizo Yamamoto Olaf Seibert Tim Lennan Deron Meranda Lars Huttar Scott Bigham
Dion Nicolaas Ken Arnold Pasi Kallinen Timo Hakulinen Dion Nicolaas Leon Arnott Scott R. Turner
Dylan O'Donnell Ken Arromdee Pat Rankin Tom Almy Dylan O'Donnell M. Drew Streib Sean Hunt
Eric Backus Ken Lorber Patric Mueller Tom West Eric Backus Malcolm Ryan Stephen Spackman
Eric Hendrickson Ken Washikita Paul Winner Warren Cheung Eric Hendrickson Mark Gooderum Stefan Thielscher
Eric R. Smith Kevin Darcy Pierre Martineau Warwick Allison Eric R. Smith Mark Modrall Stephen White
Eric S. Raymond Kevin Hugo Ralf Brown Yitzhak Sapir Eric S. Raymond Marvin Bressler Steve Creps
Erik Andersen Matthew Day Steve Linhart
Frederick Roeber Merlyn LeRoy Steve VanDevender
Gil Neiger Michael Allison Teemu Suikki
Greg Laskin Michael Feir Tim Lennan
Greg Olson Michael Hamel Timo Hakulinen
Gregg Wonderly Michael Sokolov Tom Almy
Hao-yang Wang Mike Engber Tom West
Helge Hafting Mike Gallop Warren Cheung
Irina Rempt-Drijfhout Mike Passaretti Warwick Allison
Izchak Miller Mike Stephenson Yitzhak Sapir
.\"TABLE_END Do not delete this line. .\"TABLE_END Do not delete this line.
.TE .TE
+335 -298
View File
File diff suppressed because it is too large Load Diff
+4218 -4250
View File
File diff suppressed because it is too large Load Diff
+29 -3
View File
@@ -80,7 +80,7 @@ change "unlockable chest" to "broken chest" so that it won't be misunderstood
use doname instead of xname when using '/' or ';' to look at objects on map use doname instead of xname when using '/' or ';' to look at objects on map
when a pet moves reluctantly, name the top item of the pile it is reluctant when a pet moves reluctantly, name the top item of the pile it is reluctant
to step on if the hero sees or remembers any object(s) at that spot to step on if the hero sees or remembers any object(s) at that spot
ensure sufficient messages are given to clarify the transition from detected ensure sufficient messages are given to clarify the transition from detected
vampire bats to fog clouds in Vlad's tower vampire bats to fog clouds in Vlad's tower
fix "killing by kicking something weird" when kicking an object causes death fix "killing by kicking something weird" when kicking an object causes death
avoid accessing mextra fields which haven't been allocated avoid accessing mextra fields which haven't been allocated
@@ -519,7 +519,7 @@ change the deity's "congratulations" message upon ascension to something which
sounds a bit more archaic to fit better with the other messages sounds a bit more archaic to fit better with the other messages
prayer boon of 'fix all troubles' could get stuck in an infinite loop for prayer boon of 'fix all troubles' could get stuck in an infinite loop for
TROUBLE_STUCK_IN_WALL if there was no spot to teleport into available TROUBLE_STUCK_IN_WALL if there was no spot to teleport into available
It shouldn't be considered hypocrisy if you speed up your pet while standing It shouldn't be considered hypocrisy if you speed up your pet while standing
on Elbereth on Elbereth
fix 'object lost' panic if hero with lycanthropy but in human form is wielding fix 'object lost' panic if hero with lycanthropy but in human form is wielding
a potion of unholy water which gets boiled/exploded by fire, causing a potion of unholy water which gets boiled/exploded by fire, causing
@@ -532,6 +532,13 @@ when #force reports that a chest's lock is already broken or already unlocked,
already known, rather than as "a broken chest" or "an unlocked chest" already known, rather than as "a broken chest" or "an unlocked chest"
honor wish for "locked", "unlocked", or "broken" chest or box honor wish for "locked", "unlocked", or "broken" chest or box
honor wish for "empty" container including statue, bag-o-tricks, horn-o-plenty honor wish for "empty" container including statue, bag-o-tricks, horn-o-plenty
gas spore explosion killing a gas spore which triggers a recursive explosion
would have killer reason for outer call clobbered by inner one; when
they were both "gas spore's explosion" it wouldn't be noticeable (see
corresponding post-3.6.0 entry for more...)
wizard mode 'sanity_check' gave spurious "mon not on map" warnings when mounted
at the prompt for entering a level annotation, responding with <return>
erroneously removed old annotation; use <space><return> to do that
Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository
@@ -600,6 +607,9 @@ the fix for secret doors on special levels always having vertical orientation
and the previous fix for the for secret doors didn't work if the level hadn't and the previous fix for the for secret doors didn't work if the level hadn't
been wallified yet (Cav quest) so horizontal wall with secret door been wallified yet (Cav quest) so horizontal wall with secret door
mis-displayed as a vertical wall segment could occur mis-displayed as a vertical wall segment could occur
and both the previous fixes only worked if the level description contained
an explicit DOOR directive rather than just '+' or 'S' on the map
(as with lower right area of Cav 'locate' level)
the fix intended for "a shop object stolen from outside the shop (via the fix intended for "a shop object stolen from outside the shop (via
grappling hook) would be left marked as 'unpaid'" broke normal pickup, grappling hook) would be left marked as 'unpaid'" broke normal pickup,
preventing any picked up item from merging with compatible stack preventing any picked up item from merging with compatible stack
@@ -614,6 +624,18 @@ when clairvoyance lets you move the cursor to examine the map (if it occurs
prevent Mjollnir from being auto-quivered if it's been thrown without return prevent Mjollnir from being auto-quivered if it's been thrown without return
and then picked back up while quiver slot is empty and then picked back up while quiver slot is empty
plural of "fox" is not "foxen" plural of "fox" is not "foxen"
gas spore explosion killing a gas spore which triggers a recursive explosion
would have killer reason for outer call clobbered by inner one;
"You are hit by the gas spore's explosion!" (inner call, followed by)
"You are hit by the !" (outer call, possibly repeated for multiple
explosions causing multiple levels of recursion)
if multiple bands of blank lines were squeezed out of DUMPLOG's map, spurious
blank lines appeared in the final map output
cursor positioning autodescribe of a statue while hallucinating was blank
tty+EDIT_GETLIN: if prompt plus existing output buffer contents (result of
a prior getlin() used as default input) was long enough to wrap to
second line, the wrap point could be different from when the previous
input was typed, resulting it strange erase-char/kill-chars behavior
Platform- and/or Interface-Specific Fixes Platform- and/or Interface-Specific Fixes
@@ -809,6 +831,8 @@ a prayer result which results in uncursing some or all of the hero's items
wielded aklys behaves like Mjollnir when thrown--it usually returns; unlike wielded aklys behaves like Mjollnir when thrown--it usually returns; unlike
Mjollnir, it isn't limited to Valkyries or need gauntlets of power Mjollnir, it isn't limited to Valkyries or need gauntlets of power
(so far, hero-only; an aklys won't return if thrown by a monster) (so far, hero-only; an aklys won't return if thrown by a monster)
allow 'm' prefix for wizard mode level teleport command (^V) to bypass prompt
for destination and use menu of special level locations
Platform- and/or Interface-Specific New Features Platform- and/or Interface-Specific New Features
@@ -831,6 +855,8 @@ win32gui: save and load map colors from registry
X11: add new character selection dialog, and obey player_selection:dialog X11: add new character selection dialog, and obey player_selection:dialog
unix: reduce makefile verbosity by default unix: reduce makefile verbosity by default
win32gui: new player selection dialog win32gui: new player selection dialog
tty, X11, qt4, win32gui: compile-time option to allow some prompts remember
the input
NetHack Community Patches (or Variation) Included NetHack Community Patches (or Variation) Included
@@ -843,7 +869,7 @@ Ray Chason's fix: window interfaces that support transparency may give away
Ray Chason's xprname should honor iflags.menu_tab_sep Ray Chason's xprname should honor iflags.menu_tab_sep
Ray Chason's punctuation for "That foo is really a mimic." Ray Chason's punctuation for "That foo is really a mimic."
Ray Chason's proper background tiles for lava and water Ray Chason's proper background tiles for lava and water
Ray Chason's MS-DOS port restored to functionality with credit to Reddit user Ray Chason's MS-DOS port restored to functionality with credit to Reddit user
b_helyer for the fix to sys/share/pcmain.c b_helyer for the fix to sys/share/pcmain.c
Ray Chason's MSDOS port support for some VESA modes Ray Chason's MSDOS port support for some VESA modes
Ray Chason's Qt4 windowport Ray Chason's Qt4 windowport
+9 -1
View File
@@ -53,6 +53,13 @@
.\" occurred when the the "fo" trap position was reset just beneath .\" occurred when the the "fo" trap position was reset just beneath
.\" the current line; the footnote overflow trap would kick in and .\" the current line; the footnote overflow trap would kick in and
.\" never be closed. .\" never be closed.
.\" **********
.\" Version 1.6.361 April 15, 2018
.\" The version distributed with NetHack 3.6.1 has changed the
.\" trademark notice for "UNIX"(tm) [ux macro] to reflect current
.\" ownership: The Open Group. [The pd and vx macros are also long
.\" out of date: DEC -> Compaq -> HP -> ? but haven't been changed;
.\" need confirmation that Hewlett Packard is the current owner.]
.\" .\"
.\" .\"
.\" ********** .\" **********
@@ -618,7 +625,8 @@
. nr ux +1 \" mark footnote as dropped . nr ux +1 \" mark footnote as dropped
\\&\\$2\\s-1UNIX\\s0\\*(rg\\$1 \\&\\$2\\s-1UNIX\\s0\\*(rg\\$1
. fn \" put out the footnote . fn \" put out the footnote
\\&\\*(rgUNIX is a registered trademark of AT&T. .\" was "\\&\\*(rgUNIX is a registered trademark of AT&T."
\\&\\*(rgUNIX is a registered trademark of The Open Group.
. ef \" short and sweet ... . ef \" short and sweet ...
.\} .\}
.. ..
+5
View File
@@ -514,6 +514,11 @@ typedef unsigned char uchar;
but it isn't necessary for successful operation of the program */ but it isn't necessary for successful operation of the program */
#define FREE_ALL_MEMORY /* free all memory at exit */ #define FREE_ALL_MEMORY /* free all memory at exit */
/* EDIT_GETLIN makes the string input in TTY, Qt4, and X11
so some prompts will remember the previously input text
(within the same session) */
/* #define EDIT_GETLIN */
/* Section 4b - Features causing save file incompatibility /* Section 4b - Features causing save file incompatibility
* Features listed in this section change the format of save and/or * Features listed in this section change the format of save and/or
* bones files, so in addition to the warning at the start of Section 4 * bones files, so in addition to the warning at the start of Section 4
+6 -4
View File
@@ -25,10 +25,12 @@ struct container {
genericptr_t list; genericptr_t list;
}; };
#define CONS_OBJ 0 enum bubble_contains_types {
#define CONS_MON 1 CONS_OBJ = 0,
#define CONS_HERO 2 CONS_MON,
#define CONS_TRAP 3 CONS_HERO,
CONS_TRAP
};
struct bubble { struct bubble {
xchar x, y; /* coordinates of the upper left corner */ xchar x, y; /* coordinates of the upper left corner */
+17 -12
View File
@@ -19,13 +19,15 @@
* that there are enough situations which might make a monster change its * that there are enough situations which might make a monster change its
* weapon that this is impractical. --KAA * weapon that this is impractical. --KAA
*/ */
#define NO_WEAPON_WANTED 0 enum wpn_chk_flags {
#define NEED_WEAPON 1 NO_WEAPON_WANTED = 0,
#define NEED_RANGED_WEAPON 2 NEED_WEAPON,
#define NEED_HTH_WEAPON 3 NEED_RANGED_WEAPON,
#define NEED_PICK_AXE 4 NEED_HTH_WEAPON,
#define NEED_AXE 5 NEED_PICK_AXE,
#define NEED_PICK_OR_AXE 6 NEED_AXE,
NEED_PICK_OR_AXE
};
/* The following flags are used for the second argument to display_minventory /* The following flags are used for the second argument to display_minventory
* in invent.c: * in invent.c:
@@ -39,6 +41,13 @@
#define MINV_NOLET 0x04 #define MINV_NOLET 0x04
#define MINV_ALL 0x08 #define MINV_ALL 0x08
enum m_ap_types {
M_AP_NOTHING = 0, /* mappearance unused--monster appears as itself */
M_AP_FURNITURE, /* stairs, a door, an altar, etc. */
M_AP_OBJECT, /* an object */
M_AP_MONSTER /* a monster */
};
struct monst { struct monst {
struct monst *nmon; struct monst *nmon;
struct permonst *data; struct permonst *data;
@@ -56,11 +65,7 @@ struct monst {
coord mtrack[MTSZ]; /* monster track */ coord mtrack[MTSZ]; /* monster track */
int mhp, mhpmax; int mhp, mhpmax;
unsigned mappearance; /* for undetected mimics and the wiz */ unsigned mappearance; /* for undetected mimics and the wiz */
uchar m_ap_type; /* what mappearance is describing: */ uchar m_ap_type; /* what mappearance is describing, m_ap_types */
#define M_AP_NOTHING 0 /* mappearance unused--monster appears as itself */
#define M_AP_FURNITURE 1 /* stairs, a door, an altar, etc. */
#define M_AP_OBJECT 2 /* an object */
#define M_AP_MONSTER 3 /* a monster */
schar mtame; /* level of tameness, implies peaceful */ schar mtame; /* level of tameness, implies peaceful */
unsigned short mintrinsics; /* low 8 correspond to mresists */ unsigned short mintrinsics; /* low 8 correspond to mresists */
+34 -29
View File
@@ -6,6 +6,39 @@
#define OBJCLASS_H #define OBJCLASS_H
/* [misnamed] definition of a type of object */ /* [misnamed] definition of a type of object */
enum obj_material_types {
LIQUID = 1, /* currently only for venom */
WAX,
VEGGY, /* foodstuffs */
FLESH, /* ditto */
PAPER,
CLOTH,
LEATHER,
WOOD,
BONE,
DRAGON_HIDE, /* not leather! */
IRON, /* Fe - includes steel */
METAL, /* Sn, &c. */
COPPER, /* Cu - includes brass */
SILVER, /* Ag */
GOLD, /* Au */
PLATINUM, /* Pt */
MITHRIL,
PLASTIC,
GLASS,
GEMSTONE,
MINERAL
};
enum obj_armor_types {
ARM_SUIT = 0,
ARM_SHIELD, /* needed for special wear function */
ARM_HELM,
ARM_GLOVES,
ARM_BOOTS,
ARM_CLOAK,
ARM_SHIRT
};
struct objclass { struct objclass {
short oc_name_idx; /* index of actual name */ short oc_name_idx; /* index of actual name */
@@ -40,28 +73,7 @@ struct objclass {
/*Bitfield(oc_subtyp,3);*/ /* Now too big for a bitfield... see below */ /*Bitfield(oc_subtyp,3);*/ /* Now too big for a bitfield... see below */
Bitfield(oc_material, 5); Bitfield(oc_material, 5); /* one of obj_material_types */
#define LIQUID 1 /* currently only for venom */
#define WAX 2
#define VEGGY 3 /* foodstuffs */
#define FLESH 4 /* ditto */
#define PAPER 5
#define CLOTH 6
#define LEATHER 7
#define WOOD 8
#define BONE 9
#define DRAGON_HIDE 10 /* not leather! */
#define IRON 11 /* Fe - includes steel */
#define METAL 12 /* Sn, &c. */
#define COPPER 13 /* Cu - includes brass */
#define SILVER 14 /* Ag */
#define GOLD 15 /* Au */
#define PLATINUM 16 /* Pt */
#define MITHRIL 17
#define PLASTIC 18
#define GLASS 19
#define GEMSTONE 20
#define MINERAL 21
#define is_organic(otmp) (objects[otmp->otyp].oc_material <= WOOD) #define is_organic(otmp) (objects[otmp->otyp].oc_material <= WOOD)
#define is_metallic(otmp) \ #define is_metallic(otmp) \
@@ -84,13 +96,6 @@ struct objclass {
schar oc_subtyp; schar oc_subtyp;
#define oc_skill oc_subtyp /* Skills of weapons, spellbooks, tools, gems */ #define oc_skill oc_subtyp /* Skills of weapons, spellbooks, tools, gems */
#define oc_armcat oc_subtyp /* for armor */ #define oc_armcat oc_subtyp /* for armor */
#define ARM_SHIELD 1 /* needed for special wear function */
#define ARM_HELM 2
#define ARM_GLOVES 3
#define ARM_BOOTS 4
#define ARM_CLOAK 5
#define ARM_SHIRT 6
#define ARM_SUIT 0
uchar oc_oprop; /* property (invis, &c.) conveyed */ uchar oc_oprop; /* property (invis, &c.) conveyed */
char oc_class; /* object class */ char oc_class; /* object class */
+38 -34
View File
@@ -146,43 +146,47 @@ enum opcode_defs {
* mean. * mean.
*/ */
/* MONSTER */ /* MONSTER */
#define SP_M_V_PEACEFUL 0 enum sp_mon_var_flags {
#define SP_M_V_ALIGN 1 SP_M_V_PEACEFUL = 0,
#define SP_M_V_ASLEEP 2 SP_M_V_ALIGN,
#define SP_M_V_APPEAR 3 SP_M_V_ASLEEP,
#define SP_M_V_NAME 4 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,
#define SP_M_V_FEMALE 5 SP_M_V_END
#define SP_M_V_INVIS 6 };
#define SP_M_V_CANCELLED 7
#define SP_M_V_REVIVED 8
#define SP_M_V_AVENGE 9
#define SP_M_V_FLEEING 10
#define SP_M_V_BLINDED 11
#define SP_M_V_PARALYZED 12
#define SP_M_V_STUNNED 13
#define SP_M_V_CONFUSED 14
#define SP_M_V_SEENTRAPS 15
#define SP_M_V_END 16 /* end of variable parameters */
/* OBJECT */ /* OBJECT */
#define SP_O_V_SPE 0 enum sp_obj_var_flags {
#define SP_O_V_CURSE 1 SP_O_V_SPE = 0,
#define SP_O_V_CORPSENM 2 SP_O_V_CURSE,
#define SP_O_V_NAME 3 SP_O_V_CORPSENM,
#define SP_O_V_QUAN 4 SP_O_V_NAME,
#define SP_O_V_BURIED 5 SP_O_V_QUAN,
#define SP_O_V_LIT 6 SP_O_V_BURIED,
#define SP_O_V_ERODED 7 SP_O_V_LIT,
#define SP_O_V_LOCKED 8 SP_O_V_ERODED,
#define SP_O_V_TRAPPED 9 SP_O_V_LOCKED,
#define SP_O_V_RECHARGED 10 SP_O_V_TRAPPED,
#define SP_O_V_INVIS 11 SP_O_V_RECHARGED,
#define SP_O_V_GREASED 12 SP_O_V_INVIS,
#define SP_O_V_BROKEN 13 SP_O_V_GREASED,
#define SP_O_V_COORD 14 SP_O_V_BROKEN,
#define SP_O_V_END 15 /* end of variable parameters */ SP_O_V_COORD,
SP_O_V_END
};
/* When creating objects, we need to know whether /* When creating objects, we need to know whether
* it's a container and/or contents. * it's a container and/or contents.
+10 -7
View File
@@ -254,6 +254,15 @@ struct Align {
extern const struct Align aligns[]; /* table of available alignments */ extern const struct Align aligns[]; /* table of available alignments */
enum utraptypes {
TT_BEARTRAP = 0,
TT_PIT,
TT_WEB,
TT_LAVA,
TT_INFLOOR,
TT_BURIEDBALL
};
/*** Information about the player ***/ /*** Information about the player ***/
struct you { struct you {
xchar ux, uy; /* current map coordinates */ xchar ux, uy; /* current map coordinates */
@@ -270,13 +279,7 @@ struct you {
int ulevel; /* 1 to MAXULEV */ int ulevel; /* 1 to MAXULEV */
int ulevelmax; int ulevelmax;
unsigned utrap; /* trap timeout */ unsigned utrap; /* trap timeout */
unsigned utraptype; /* defined if utrap nonzero */ unsigned utraptype; /* defined if utrap nonzero. one of utraptypes */
#define TT_BEARTRAP 0
#define TT_PIT 1
#define TT_WEB 2
#define TT_LAVA 3
#define TT_INFLOOR 4
#define TT_BURIEDBALL 5
char urooms[5]; /* rooms (roomno + 3) occupied now */ char urooms[5]; /* rooms (roomno + 3) occupied now */
char urooms0[5]; /* ditto, for previous position */ char urooms0[5]; /* ditto, for previous position */
char uentered[5]; /* rooms (roomno + 3) entered this turn */ char uentered[5]; /* rooms (roomno + 3) entered this turn */
+2
View File
@@ -3300,10 +3300,12 @@ struct obj *obj;
goto wanexpl; goto wanexpl;
case WAN_FIRE: case WAN_FIRE:
expltype = EXPL_FIERY; expltype = EXPL_FIERY;
/*FALLTHRU*/
case WAN_COLD: case WAN_COLD:
if (expltype == EXPL_MAGICAL) if (expltype == EXPL_MAGICAL)
expltype = EXPL_FROSTY; expltype = EXPL_FROSTY;
dmg *= 2; dmg *= 2;
/*FALLTHRU*/
case WAN_MAGIC_MISSILE: case WAN_MAGIC_MISSILE:
wanexpl: wanexpl:
explode(u.ux, u.uy, -(obj->otyp), dmg, WAND_CLASS, expltype); explode(u.ux, u.uy, -(obj->otyp), dmg, WAND_CLASS, expltype);
+11 -5
View File
@@ -940,15 +940,21 @@ winid tmpwin; /* supplied by dodiscover() */
* stun attack. As of 3.4.1, those effects can occur but * stun attack. As of 3.4.1, those effects can occur but
* will be slightly less likely than they were in 3.3.x.] * will be slightly less likely than they were in 3.3.x.]
*/ */
enum mb_effect_indices {
MB_INDEX_PROBE = 0,
MB_INDEX_STUN,
MB_INDEX_SCARE,
MB_INDEX_CANCEL,
NUM_MB_INDICES
};
#define MB_MAX_DIEROLL 8 /* rolls above this aren't magical */ #define MB_MAX_DIEROLL 8 /* rolls above this aren't magical */
static const char *const mb_verb[2][4] = { static const char *const mb_verb[2][NUM_MB_INDICES] = {
{ "probe", "stun", "scare", "cancel" }, { "probe", "stun", "scare", "cancel" },
{ "prod", "amaze", "tickle", "purge" }, { "prod", "amaze", "tickle", "purge" },
}; };
#define MB_INDEX_PROBE 0
#define MB_INDEX_STUN 1
#define MB_INDEX_SCARE 2
#define MB_INDEX_CANCEL 3
/* called when someone is being hit by Magicbane */ /* called when someone is being hit by Magicbane */
STATIC_OVL boolean STATIC_OVL boolean
+2 -6
View File
@@ -1355,7 +1355,6 @@ int *colorptr;
/* there are hilites set here */ /* there are hilites set here */
int max_pc = 0, min_pc = 100; int max_pc = 0, min_pc = 100;
int max_val = 0, min_val = LARGEST_INT; int max_val = 0, min_val = LARGEST_INT;
boolean changed = FALSE;
boolean exactmatch = FALSE; boolean exactmatch = FALSE;
hl = blstats[idx][fldidx].thresholds; hl = blstats[idx][fldidx].thresholds;
@@ -1382,14 +1381,11 @@ int *colorptr;
case BL_TH_UPDOWN: case BL_TH_UPDOWN:
if (chg < 0 && hl->rel == LT_VALUE) { if (chg < 0 && hl->rel == LT_VALUE) {
merge_bestcolor(&bestcolor, hl->coloridx); merge_bestcolor(&bestcolor, hl->coloridx);
changed = TRUE;
} else if (chg > 0 && hl->rel == GT_VALUE) { } else if (chg > 0 && hl->rel == GT_VALUE) {
merge_bestcolor(&bestcolor, hl->coloridx); merge_bestcolor(&bestcolor, hl->coloridx);
changed = TRUE;
} else if (hl->rel == EQ_VALUE && chg) { } else if (hl->rel == EQ_VALUE && chg) {
merge_bestcolor(&bestcolor, hl->coloridx); merge_bestcolor(&bestcolor, hl->coloridx);
min_val = max_val = hl->value.a_int; min_val = max_val = hl->value.a_int;
changed = TRUE;
} }
break; break;
case BL_TH_VAL_ABSOLUTE: case BL_TH_VAL_ABSOLUTE:
@@ -2740,7 +2736,7 @@ choose_value:
if (behavior == BL_TH_VAL_PERCENTAGE if (behavior == BL_TH_VAL_PERCENTAGE
|| behavior == BL_TH_VAL_ABSOLUTE) { || behavior == BL_TH_VAL_ABSOLUTE) {
char inbuf[BUFSZ], buf[BUFSZ]; char inbuf[BUFSZ] = DUMMY, buf[BUFSZ];
int val; int val;
boolean skipltgt = FALSE; boolean skipltgt = FALSE;
boolean gotnum = FALSE; boolean gotnum = FALSE;
@@ -2902,7 +2898,7 @@ choose_value:
hilite.rel = TXT_VALUE; hilite.rel = TXT_VALUE;
Strcpy(hilite.textmatch, rolelist[rv]); Strcpy(hilite.textmatch, rolelist[rv]);
} else { } else {
char inbuf[BUFSZ]; char inbuf[BUFSZ] = DUMMY;
inbuf[0] = '\0'; inbuf[0] = '\0';
getlin(qry_buf, inbuf); getlin(qry_buf, inbuf);
+14 -8
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 cmd.c $NHDT-Date: 1518861485 2018/02/17 09:58:05 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.278 $ */ /* NetHack 3.6 cmd.c $NHDT-Date: 1523306904 2018/04/09 20:48:24 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.281 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -750,7 +750,7 @@ wiz_mon_polycontrol(VOID_ARGS)
STATIC_PTR int STATIC_PTR int
wiz_level_change(VOID_ARGS) wiz_level_change(VOID_ARGS)
{ {
char buf[BUFSZ]; char buf[BUFSZ] = DUMMY;
int newlevel; int newlevel;
int ret; int ret;
@@ -3697,7 +3697,7 @@ static int
wiz_migrate_mons() wiz_migrate_mons()
{ {
int mcount = 0; int mcount = 0;
char inbuf[BUFSZ]; char inbuf[BUFSZ] = DUMMY;
struct permonst *ptr; struct permonst *ptr;
struct monst *mtmp; struct monst *mtmp;
d_level tolevel; d_level tolevel;
@@ -4049,6 +4049,8 @@ int NDECL((*cmd_func));
|| cmd_func == doloot || cmd_func == doloot
/* travel: pop up a menu of interesting targets in view */ /* travel: pop up a menu of interesting targets in view */
|| cmd_func == dotravel || cmd_func == dotravel
/* wizard mode ^V */
|| cmd_func == wiz_level_tele
/* 'm' prefix allowed for some extended commands */ /* 'm' prefix allowed for some extended commands */
|| cmd_func == doextcmd || cmd_func == doextlist) || cmd_func == doextcmd || cmd_func == doextlist)
return TRUE; return TRUE;
@@ -4118,7 +4120,8 @@ register char *cmd;
break; break;
case NHKF_RUN2: case NHKF_RUN2:
if (!Cmd.num_pad) if (!Cmd.num_pad)
break; /* else FALLTHRU */ break;
/*FALLTHRU*/
case NHKF_RUN: case NHKF_RUN:
if (movecmd(lowc(cmd[1]))) { if (movecmd(lowc(cmd[1]))) {
context.run = 3; context.run = 3;
@@ -4128,7 +4131,8 @@ register char *cmd;
break; break;
case NHKF_FIGHT2: case NHKF_FIGHT2:
if (!Cmd.num_pad) if (!Cmd.num_pad)
break; /* else FALLTHRU */ break;
/*FALLTHRU*/
/* Effects of movement commands and invisible monsters: /* Effects of movement commands and invisible monsters:
* m: always move onto space (even if 'I' remembered) * m: always move onto space (even if 'I' remembered)
* F: always attack space (even if 'I' not remembered) * F: always attack space (even if 'I' not remembered)
@@ -4527,14 +4531,16 @@ const char *msg;
break; break;
case NHKF_RUN2: case NHKF_RUN2:
if (!Cmd.num_pad) if (!Cmd.num_pad)
break; /* else FALLTHRU */ break;
/*FALLTHRU*/
case NHKF_RUN: case NHKF_RUN:
case NHKF_RUN_NOPICKUP: case NHKF_RUN_NOPICKUP:
dothat = "run"; dothat = "run";
break; break;
case NHKF_FIGHT2: case NHKF_FIGHT2:
if (!Cmd.num_pad) if (!Cmd.num_pad)
break; /* else FALLTHRU */ break;
/*FALLTHRU*/
case NHKF_FIGHT: case NHKF_FIGHT:
dothat = "fight"; dothat = "fight";
how = ""; /* avoid "fight at yourself" */ how = ""; /* avoid "fight at yourself" */
@@ -5449,7 +5455,7 @@ const char *prompt;
to give the go-ahead for this query; default is "no" unless the to give the go-ahead for this query; default is "no" unless the
ParanoidConfirm flag is set in which case there's no default */ ParanoidConfirm flag is set in which case there's no default */
if (be_paranoid) { if (be_paranoid) {
char qbuf[QBUFSZ], ans[BUFSZ]; char qbuf[QBUFSZ], ans[BUFSZ] = DUMMY;
const char *promptprefix = "", *responsetype = ParanoidConfirm const char *promptprefix = "", *responsetype = ParanoidConfirm
? "(yes|no)" ? "(yes|no)"
: "(yes) [no]"; : "(yes) [no]";
+9 -5
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 detect.c $NHDT-Date: 1519281847 2018/02/22 06:44:07 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.80 $ */ /* NetHack 3.6 detect.c $NHDT-Date: 1522891623 2018/04/05 01:27:03 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.81 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -1802,7 +1802,7 @@ int default_glyph, which_subset;
void void
dump_map() dump_map()
{ {
int x, y, glyph, skippedrows; int x, y, glyph, skippedrows, lastnonblank;
int subset = TER_MAP | TER_TRP | TER_OBJ | TER_MON; int subset = TER_MAP | TER_TRP | TER_OBJ | TER_MON;
int default_glyph = cmap_to_glyph(level.flags.arboreal ? S_tree : S_stone); int default_glyph = cmap_to_glyph(level.flags.arboreal ? S_tree : S_stone);
char buf[BUFSZ]; char buf[BUFSZ];
@@ -1820,19 +1820,22 @@ dump_map()
toprow = TRUE; toprow = TRUE;
for (y = 0; y < ROWNO; y++) { for (y = 0; y < ROWNO; y++) {
blankrow = TRUE; /* assume blank until we discover otherwise */ blankrow = TRUE; /* assume blank until we discover otherwise */
lastnonblank = -1; /* buf[] index rather than map's x */
for (x = 1; x < COLNO; x++) { for (x = 1; x < COLNO; x++) {
int ch, color; int ch, color;
unsigned special; unsigned special;
glyph = reveal_terrain_getglyph(x,y, FALSE, u.uswallow, glyph = reveal_terrain_getglyph(x, y, FALSE, u.uswallow,
default_glyph, subset); default_glyph, subset);
(void) mapglyph(glyph, &ch, &color, &special, x, y); (void) mapglyph(glyph, &ch, &color, &special, x, y);
buf[x - 1] = ch; buf[x - 1] = ch;
if (ch != ' ') if (ch != ' ') {
blankrow = FALSE; blankrow = FALSE;
lastnonblank = x - 1;
}
} }
if (!blankrow) { if (!blankrow) {
buf[x - 2] = '\0'; buf[lastnonblank + 1] = '\0';
if (toprow) { if (toprow) {
skippedrows = 0; skippedrows = 0;
toprow = FALSE; toprow = FALSE;
@@ -1840,6 +1843,7 @@ dump_map()
for (x = 0; x < skippedrows; x++) for (x = 0; x < skippedrows; x++)
putstr(0, 0, ""); putstr(0, 0, "");
putstr(0, 0, buf); /* map row #y */ putstr(0, 0, buf); /* map row #y */
skippedrows = 0;
} else { } else {
++skippedrows; ++skippedrows;
} }
+8 -6
View File
@@ -16,12 +16,14 @@ STATIC_DCL int FDECL(adj_pit_checks, (coord *, char *));
STATIC_DCL void FDECL(pit_flow, (struct trap *, SCHAR_P)); STATIC_DCL void FDECL(pit_flow, (struct trap *, SCHAR_P));
/* Indices returned by dig_typ() */ /* Indices returned by dig_typ() */
#define DIGTYP_UNDIGGABLE 0 enum dig_types {
#define DIGTYP_ROCK 1 DIGTYP_UNDIGGABLE = 0,
#define DIGTYP_STATUE 2 DIGTYP_ROCK,
#define DIGTYP_BOULDER 3 DIGTYP_STATUE,
#define DIGTYP_DOOR 4 DIGTYP_BOULDER,
#define DIGTYP_TREE 5 DIGTYP_DOOR,
DIGTYP_TREE
};
STATIC_OVL boolean STATIC_OVL boolean
rm_waslit() rm_waslit()
+1
View File
@@ -391,6 +391,7 @@ xchar worm_tail; /* mon is actually a worm tail */
default: default:
impossible("display_monster: bad m_ap_type value [ = %d ]", impossible("display_monster: bad m_ap_type value [ = %d ]",
(int) mon->m_ap_type); (int) mon->m_ap_type);
/*FALLTHRU*/
case M_AP_NOTHING: case M_AP_NOTHING:
show_glyph(x, y, mon_to_glyph(mon)); show_glyph(x, y, mon_to_glyph(mon));
break; break;
+3 -3
View File
@@ -1109,7 +1109,7 @@ char *monnambuf, *usrbuf;
STATIC_OVL void STATIC_OVL void
do_mname() do_mname()
{ {
char buf[BUFSZ], monnambuf[BUFSZ], qbuf[QBUFSZ]; char buf[BUFSZ] = DUMMY, monnambuf[BUFSZ], qbuf[QBUFSZ];
coord cc; coord cc;
int cx, cy; int cx, cy;
struct monst *mtmp = 0; struct monst *mtmp = 0;
@@ -1188,7 +1188,7 @@ void
do_oname(obj) do_oname(obj)
register struct obj *obj; register struct obj *obj;
{ {
char *bufp, buf[BUFSZ], bufcpy[BUFSZ], qbuf[QBUFSZ]; char *bufp, buf[BUFSZ] = DUMMY, bufcpy[BUFSZ], qbuf[QBUFSZ];
const char *aname; const char *aname;
short objtyp; short objtyp;
@@ -1443,7 +1443,7 @@ void
docall(obj) docall(obj)
struct obj *obj; struct obj *obj;
{ {
char buf[BUFSZ], qbuf[QBUFSZ]; char buf[BUFSZ] = DUMMY, qbuf[QBUFSZ];
char **str1; char **str1;
if (!obj->dknown) if (!obj->dknown)
+3 -1
View File
@@ -846,6 +846,7 @@ dokick()
pline("%s burps loudly.", Monnam(u.ustuck)); pline("%s burps loudly.", Monnam(u.ustuck));
break; break;
} }
/*FALLTHRU*/
default: default:
Your("feeble kick has no effect."); Your("feeble kick has no effect.");
break; break;
@@ -1327,7 +1328,8 @@ schar loc;
} else if (In_endgame(&u.uz) || Is_botlevel(&u.uz)) { } else if (In_endgame(&u.uz) || Is_botlevel(&u.uz)) {
cc->y = cc->x = 0; cc->y = cc->x = 0;
break; break;
} /* else fall to the next cases */ }
/*FALLTHRU*/
case MIGR_STAIRS_UP: case MIGR_STAIRS_UP:
case MIGR_LADDER_UP: case MIGR_LADDER_UP:
cc->x = u.uz.dnum; cc->x = u.uz.dnum;
+11 -3
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 dothrow.c $NHDT-Date: 1520103267 2018/03/03 18:54:27 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.133 $ */ /* NetHack 3.6 dothrow.c $NHDT-Date: 1522967321 2018/04/05 22:28:41 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.135 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -360,8 +360,14 @@ dofire()
* If quiver is empty, we use autoquiver to fill it when the * If quiver is empty, we use autoquiver to fill it when the
* corresponding option is on. If the option is off or if * corresponding option is on. If the option is off or if
* autoquiver doesn't select anything, we ask what to throw. * autoquiver doesn't select anything, we ask what to throw.
* For the last, if player's response is a stack, we put * Then we put the chosen item into the quiver slot unless
* that stack into quiver slot provided it's not wielded. * it is already in another slot. [Matters most if it is a
* stack but also matters for single item if this throw gets
* aborted (ESC at the direction prompt). Already wielded
* item is excluded because wielding might be necessary
* (Mjollnir) or make the throw behave differently (aklys),
* and alt-wielded item is excluded because switching slots
* would end two-weapon combat even if throw gets aborted.]
*/ */
if (!ok_to_throw(&shotlimit)) if (!ok_to_throw(&shotlimit))
return 0; return 0;
@@ -957,6 +963,7 @@ boolean hitsroof;
Your("%s fails to protect you.", helm_simple_name(uarmh)); Your("%s fails to protect you.", helm_simple_name(uarmh));
goto petrify; goto petrify;
} }
/*FALLTHRU*/
case CREAM_PIE: case CREAM_PIE:
case BLINDING_VENOM: case BLINDING_VENOM:
pline("You've got it all over your %s!", body_part(FACE)); pline("You've got it all over your %s!", body_part(FACE));
@@ -2014,6 +2021,7 @@ boolean in_view;
default: /* glass or crystal wand */ default: /* glass or crystal wand */
if (obj->oclass != WAND_CLASS) if (obj->oclass != WAND_CLASS)
impossible("breaking odd object?"); impossible("breaking odd object?");
/*FALLTHRU*/
case CRYSTAL_PLATE_MAIL: case CRYSTAL_PLATE_MAIL:
case LENSES: case LENSES:
case MIRROR: case MIRROR:
+44 -21
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 dungeon.c $NHDT-Date: 1517912411 2018/02/06 10:20:11 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.83 $ */ /* NetHack 3.6 dungeon.c $NHDT-Date: 1523308357 2018/04/09 21:12:37 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.87 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -966,7 +966,7 @@ init_dungeons()
instead of 0, so adjust the start point to shift endgame up */ instead of 0, so adjust the start point to shift endgame up */
if (dunlevs_in_dungeon(&x->dlevel) > 1 - dungeons[i].depth_start) if (dunlevs_in_dungeon(&x->dlevel) > 1 - dungeons[i].depth_start)
dungeons[i].depth_start -= 1; dungeons[i].depth_start -= 1;
/* TO DO: strip "dummy" out all the way here, /* TODO: strip "dummy" out all the way here,
so that it's hidden from <ctrl/O> feedback. */ so that it's hidden from <ctrl/O> feedback. */
} }
@@ -1848,8 +1848,8 @@ xchar *rdgn;
branch *br; branch *br;
anything any; anything any;
struct lchoice lchoices; struct lchoice lchoices;
winid win = create_nhwindow(NHW_MENU); winid win = create_nhwindow(NHW_MENU);
if (bymenu) { if (bymenu) {
start_menu(win); start_menu(win);
lchoices.idx = 0; lchoices.idx = 0;
@@ -1952,26 +1952,35 @@ xchar *rdgn;
Sprintf(buf, "Invocation position @ (%d,%d), hero @ (%d,%d)", Sprintf(buf, "Invocation position @ (%d,%d), hero @ (%d,%d)",
inv_pos.x, inv_pos.y, u.ux, u.uy); inv_pos.x, inv_pos.y, u.ux, u.uy);
putstr(win, 0, buf); putstr(win, 0, buf);
} } else {
/*
* The following is based on the assumption that the inter-level portals
* created by the level compiler (not the dungeon compiler) only exist
* one per level (currently true, of course).
*/
else if (Is_earthlevel(&u.uz) || Is_waterlevel(&u.uz)
|| Is_firelevel(&u.uz) || Is_airlevel(&u.uz)) {
struct trap *trap; struct trap *trap;
/* if current level has a magic portal, report its location;
this assumes that there is at most one magic portal on any
given level; quest and ft.ludios have pairs (one in main
dungeon matched with one in the corresponding branch), the
elemental planes have singletons (connection to next plane) */
*buf = '\0';
for (trap = ftrap; trap; trap = trap->ntrap) for (trap = ftrap; trap; trap = trap->ntrap)
if (trap->ttyp == MAGIC_PORTAL) if (trap->ttyp == MAGIC_PORTAL)
break; break;
putstr(win, 0, "");
if (trap) if (trap)
Sprintf(buf, "Portal @ (%d,%d), hero @ (%d,%d)", trap->tx, Sprintf(buf, "Portal @ (%d,%d), hero @ (%d,%d)",
trap->ty, u.ux, u.uy); trap->tx, trap->ty, u.ux, u.uy);
else
Sprintf(buf, "No portal found."); /* only report "no portal found" when actually expecting a portal */
putstr(win, 0, buf); else if (Is_earthlevel(&u.uz) || Is_waterlevel(&u.uz)
|| Is_firelevel(&u.uz) || Is_airlevel(&u.uz)
|| Is_qstart(&u.uz) || at_dgn_entrance("The Quest")
|| Is_knox(&u.uz))
Strcpy(buf, "No portal found.");
/* only give output if we found a portal or expected one and didn't */
if (*buf) {
putstr(win, 0, "");
putstr(win, 0, buf);
}
} }
display_nhwindow(win, TRUE); display_nhwindow(win, TRUE);
@@ -2039,15 +2048,28 @@ donamelevel()
if (!(mptr = find_mapseen(&u.uz))) if (!(mptr = find_mapseen(&u.uz)))
return 0; return 0;
nbuf[0] = '\0';
#ifdef EDIT_GETLIN
if (mptr->custom) {
(void) strncpy(nbuf, mptr->custom, BUFSZ);
nbuf[BUFSZ - 1] = '\0';
}
#else
if (mptr->custom) { if (mptr->custom) {
char tmpbuf[BUFSZ]; char tmpbuf[BUFSZ];
Sprintf(tmpbuf, "Replace annotation \"%.30s%s\" with?", mptr->custom, Sprintf(tmpbuf, "Replace annotation \"%.30s%s\" with?", mptr->custom,
strlen(mptr->custom) > 30 ? "..." : ""); (strlen(mptr->custom) > 30) ? "..." : "");
getlin(tmpbuf, nbuf); getlin(tmpbuf, nbuf);
} else } else
#endif
getlin("What do you want to call this dungeon level?", nbuf); getlin("What do you want to call this dungeon level?", nbuf);
if (index(nbuf, '\033'))
/* empty input or ESC means don't add or change annotation;
space-only means discard current annotation without adding new one */
if (!*nbuf || *nbuf == '\033')
return 0; return 0;
/* strip leading and trailing spaces, compress out consecutive spaces */
(void) mungspaces(nbuf); (void) mungspaces(nbuf);
/* discard old annotation, if any */ /* discard old annotation, if any */
@@ -2056,7 +2078,8 @@ donamelevel()
mptr->custom = (char *) 0; mptr->custom = (char *) 0;
mptr->custom_lth = 0; mptr->custom_lth = 0;
} }
/* add new annotation, unless it's empty or a single space */ /* add new annotation, unless it's all spaces (which will be an
empty string after mungspaces() above) */
if (*nbuf && strcmp(nbuf, " ")) { if (*nbuf && strcmp(nbuf, " ")) {
mptr->custom = dupstr(nbuf); mptr->custom = dupstr(nbuf);
mptr->custom_lth = strlen(mptr->custom); mptr->custom_lth = strlen(mptr->custom);
@@ -2590,7 +2613,7 @@ recalc_mapseen()
} }
if (is_drawbridge_wall(x, y) < 0) if (is_drawbridge_wall(x, y) < 0)
break; break;
/* else FALLTHRU */ /*FALLTHRU*/
case DBWALL: case DBWALL:
case DRAWBRIDGE_DOWN: case DRAWBRIDGE_DOWN:
if (Is_stronghold(&u.uz)) if (Is_stronghold(&u.uz))
+1 -1
View File
@@ -1812,7 +1812,7 @@ struct obj *otmp;
make_vomiting((long) rn1(context.victual.reqtime, 5), FALSE); make_vomiting((long) rn1(context.victual.reqtime, 5), FALSE);
break; break;
} }
/* else FALLTHRU */ /*FALLTHRU*/
default: default:
if (otmp->otyp == SLIME_MOLD && !otmp->cursed if (otmp->otyp == SLIME_MOLD && !otmp->cursed
&& otmp->spe == context.current_fruit) { && otmp->spe == context.current_fruit) {
+14 -9
View File
@@ -1572,23 +1572,28 @@ int status;
extern const int monstr[]; extern const int monstr[];
static const char *vanqorders[] = { enum vanq_order_modes {
VANQ_MLVL_MNDX = 0,
VANQ_MSTR_MNDX,
VANQ_ALPHA_SEP,
VANQ_ALPHA_MIX,
VANQ_MCLS_HTOL,
VANQ_MCLS_LTOH,
VANQ_COUNT_H_L,
VANQ_COUNT_L_H,
NUM_VANQ_ORDER_MODES
};
static const char *vanqorders[NUM_VANQ_ORDER_MODES] = {
"traditional: by monster level, by internal monster index", "traditional: by monster level, by internal monster index",
#define VANQ_MLVL_MNDX 0
"by monster toughness, by internal monster index", "by monster toughness, by internal monster index",
#define VANQ_MSTR_MNDX 1
"alphabetically, first unique monsters, then others", "alphabetically, first unique monsters, then others",
#define VANQ_ALPHA_SEP 2
"alphabetically, unique monsters and others intermixed", "alphabetically, unique monsters and others intermixed",
#define VANQ_ALPHA_MIX 3
"by monster class, high to low level within class", "by monster class, high to low level within class",
#define VANQ_MCLS_HTOL 4
"by monster class, low to high level within class", "by monster class, low to high level within class",
#define VANQ_MCLS_LTOH 5
"by count, high to low, by internal index within tied count", "by count, high to low, by internal index within tied count",
#define VANQ_COUNT_H_L 6
"by count, low to high, by internal index within tied count", "by count, low to high, by internal index within tied count",
#define VANQ_COUNT_L_H 7
}; };
static int vanq_sortmode = VANQ_MLVL_MNDX; static int vanq_sortmode = VANQ_MLVL_MNDX;
+1
View File
@@ -708,6 +708,7 @@ doengrave()
"A few ice cubes drop from the wand."); "A few ice cubes drop from the wand.");
if (!oep || (oep->engr_type != BURN)) if (!oep || (oep->engr_type != BURN))
break; break;
/*FALLTHRU*/
case WAN_CANCELLATION: case WAN_CANCELLATION:
case WAN_MAKE_INVISIBLE: case WAN_MAKE_INVISIBLE:
if (oep && oep->engr_type != HEADSTONE) { if (oep && oep->engr_type != HEADSTONE) {
+5 -3
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 explode.c $NHDT-Date: 1513297345 2017/12/15 00:22:25 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.55 $ */ /* NetHack 3.6 explode.c $NHDT-Date: 1522454717 2018/03/31 00:05:17 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.56 $ */
/* Copyright (C) 1990 by Ken Arromdee */ /* Copyright (C) 1990 by Ken Arromdee */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -44,7 +44,7 @@ int expltype;
boolean shopdamage = FALSE, generic = FALSE, physical_dmg = FALSE, boolean shopdamage = FALSE, generic = FALSE, physical_dmg = FALSE,
do_hallu = FALSE, inside_engulfer, grabbed, grabbing; do_hallu = FALSE, inside_engulfer, grabbed, grabbing;
coord grabxy; coord grabxy;
char hallu_buf[BUFSZ]; char hallu_buf[BUFSZ], killr_buf[BUFSZ];
short exploding_wand_typ = 0; short exploding_wand_typ = 0;
if (olet == WAND_CLASS) { /* retributive strike */ if (olet == WAND_CLASS) { /* retributive strike */
@@ -114,7 +114,9 @@ int expltype;
*/ */
if (olet == MON_EXPLODE) { if (olet == MON_EXPLODE) {
str = killer.name; /* when explode() is called recursively, killer.name might change so
we need to retain a copy of the current value for this explosion */
str = strcpy(killr_buf, killer.name);
do_hallu = (Hallucination do_hallu = (Hallucination
&& (strstri(str, "'s explosion") && (strstri(str, "'s explosion")
|| strstri(str, "s' explosion"))); || strstri(str, "s' explosion")));
+3
View File
@@ -330,6 +330,7 @@ drinkfountain()
dofindgem(); dofindgem();
break; break;
} }
/*FALLTHRU*/
case 28: /* Water Nymph */ case 28: /* Water Nymph */
dowaternymph(); dowaternymph();
break; break;
@@ -445,6 +446,7 @@ register struct obj *obj;
dofindgem(); dofindgem();
break; break;
} }
/*FALLTHRU*/
case 25: /* Water gushes forth */ case 25: /* Water gushes forth */
dogushforth(FALSE); dogushforth(FALSE);
break; break;
@@ -616,6 +618,7 @@ drinksink()
pline("From the murky drain, a hand reaches up... --oops--"); pline("From the murky drain, a hand reaches up... --oops--");
break; break;
} }
/*FALLTHRU*/
default: default:
You("take a sip of %s %s.", You("take a sip of %s %s.",
rn2(3) ? (rn2(2) ? "cold" : "warm") : "hot", rn2(3) ? (rn2(2) ? "cold" : "warm") : "hot",
+3 -1
View File
@@ -1593,7 +1593,7 @@ unsigned *resultflags;
int oletct, iletct, unpaid, oc_of_sym; int oletct, iletct, unpaid, oc_of_sym;
char sym, *ip, olets[MAXOCLASSES + 5], ilets[MAXOCLASSES + 10]; char sym, *ip, olets[MAXOCLASSES + 5], ilets[MAXOCLASSES + 10];
char extra_removeables[3 + 1]; /* uwep,uswapwep,uquiver */ char extra_removeables[3 + 1]; /* uwep,uswapwep,uquiver */
char buf[BUFSZ], qbuf[QBUFSZ]; char buf[BUFSZ] = DUMMY, qbuf[QBUFSZ];
if (!invent) { if (!invent) {
You("have nothing to %s.", word); You("have nothing to %s.", word);
@@ -1867,6 +1867,7 @@ nextclass:
switch (sym) { switch (sym) {
case 'a': case 'a':
allflag = 1; allflag = 1;
/*FALLTHRU*/
case 'y': case 'y':
tmp = (*fn)(otmp); tmp = (*fn)(otmp);
if (tmp < 0) { if (tmp < 0) {
@@ -1883,6 +1884,7 @@ nextclass:
cnt += tmp; cnt += tmp;
if (--mx == 0) if (--mx == 0)
goto ret; goto ret;
/*FALLTHRU*/
case 'n': case 'n':
if (nodot) if (nodot)
dud++; dud++;
+1 -1
View File
@@ -691,7 +691,7 @@ struct obj *otmp;
{ {
#ifdef SHELL /* can't access mail reader without spawning subprocess */ #ifdef SHELL /* can't access mail reader without spawning subprocess */
const char *txt, *cmd; const char *txt, *cmd;
char *p, buf[BUFSZ], qbuf[BUFSZ]; char *p, buf[BUFSZ] = DUMMY, qbuf[BUFSZ];
int len; int len;
/* there should be a command in OMAILCMD */ /* there should be a command in OMAILCMD */
+3
View File
@@ -668,10 +668,13 @@ register struct monst *mtmp;
/* MAJOR fall through ... */ /* MAJOR fall through ... */
case 0: case 0:
(void) mongets(mtmp, WAN_MAGIC_MISSILE); (void) mongets(mtmp, WAN_MAGIC_MISSILE);
/*FALLTHRU*/
case 1: case 1:
(void) mongets(mtmp, POT_EXTRA_HEALING); (void) mongets(mtmp, POT_EXTRA_HEALING);
/*FALLTHRU*/
case 2: case 2:
(void) mongets(mtmp, POT_HEALING); (void) mongets(mtmp, POT_HEALING);
/*FALLTHRU*/
case 3: case 3:
(void) mongets(mtmp, WAN_STRIKING); (void) mongets(mtmp, WAN_STRIKING);
} }
+28 -24
View File
@@ -5,30 +5,34 @@
#include "hack.h" #include "hack.h"
/* monster mage spells */ /* monster mage spells */
#define MGC_PSI_BOLT 0 enum mcast_mage_spells {
#define MGC_CURE_SELF 1 MGC_PSI_BOLT = 0,
#define MGC_HASTE_SELF 2 MGC_CURE_SELF,
#define MGC_STUN_YOU 3 MGC_HASTE_SELF,
#define MGC_DISAPPEAR 4 MGC_STUN_YOU,
#define MGC_WEAKEN_YOU 5 MGC_DISAPPEAR,
#define MGC_DESTRY_ARMR 6 MGC_WEAKEN_YOU,
#define MGC_CURSE_ITEMS 7 MGC_DESTRY_ARMR,
#define MGC_AGGRAVATION 8 MGC_CURSE_ITEMS,
#define MGC_SUMMON_MONS 9 MGC_AGGRAVATION,
#define MGC_CLONE_WIZ 10 MGC_SUMMON_MONS,
#define MGC_DEATH_TOUCH 11 MGC_CLONE_WIZ,
MGC_DEATH_TOUCH
};
/* monster cleric spells */ /* monster cleric spells */
#define CLC_OPEN_WOUNDS 0 enum mcast_cleric_spells {
#define CLC_CURE_SELF 1 CLC_OPEN_WOUNDS = 0,
#define CLC_CONFUSE_YOU 2 CLC_CURE_SELF,
#define CLC_PARALYZE 3 CLC_CONFUSE_YOU,
#define CLC_BLIND_YOU 4 CLC_PARALYZE,
#define CLC_INSECTS 5 CLC_BLIND_YOU,
#define CLC_CURSE_ITEMS 6 CLC_INSECTS,
#define CLC_LIGHTNING 7 CLC_CURSE_ITEMS,
#define CLC_FIRE_PILLAR 8 CLC_LIGHTNING,
#define CLC_GEYSER 9 CLC_FIRE_PILLAR,
CLC_GEYSER
};
STATIC_DCL void FDECL(cursetxt, (struct monst *, BOOLEAN_P)); STATIC_DCL void FDECL(cursetxt, (struct monst *, BOOLEAN_P));
STATIC_DCL int FDECL(choose_magic_spell, (int)); STATIC_DCL int FDECL(choose_magic_spell, (int));
@@ -86,7 +90,7 @@ int spellval;
case 23: case 23:
if (Antimagic || Hallucination) if (Antimagic || Hallucination)
return MGC_PSI_BOLT; return MGC_PSI_BOLT;
/* else FALL THROUGH */ /*FALLTHRU*/
case 22: case 22:
case 21: case 21:
case 20: case 20:
@@ -141,7 +145,7 @@ int spellnum;
case 14: case 14:
if (rn2(3)) if (rn2(3))
return CLC_OPEN_WOUNDS; return CLC_OPEN_WOUNDS;
/* else FALL THROUGH */ /*FALLTHRU*/
case 13: case 13:
return CLC_GEYSER; return CLC_GEYSER;
case 12: case 12:
+1
View File
@@ -573,6 +573,7 @@ struct attack *mattk;
Sprintf(buf, "%s squeezes", magr_name); Sprintf(buf, "%s squeezes", magr_name);
break; break;
} }
/*FALLTHRU*/
default: default:
Sprintf(buf, "%s hits", magr_name); Sprintf(buf, "%s hits", magr_name);
} }
+3 -2
View File
@@ -1316,7 +1316,7 @@ register struct attack *mattk;
return 3; return 3;
break; break;
} }
/* else FALLTHRU */ /*FALLTHRU*/
case AD_SITM: /* for now these are the same */ case AD_SITM: /* for now these are the same */
case AD_SEDU: case AD_SEDU:
if (is_animal(mtmp->data)) { if (is_animal(mtmp->data)) {
@@ -1553,7 +1553,8 @@ register struct attack *mattk;
done(DIED); done(DIED);
dmg = 0; dmg = 0;
break; break;
} /* else FALLTHRU */ }
/*FALLTHRU*/
default: /* case 16: ... case 5: */ default: /* case 16: ... case 5: */
You_feel("your life force draining away..."); You_feel("your life force draining away...");
permdmg = 1; /* actual damage done below */ permdmg = 1; /* actual damage done below */
+1 -1
View File
@@ -298,7 +298,7 @@ long
bribe(mtmp) bribe(mtmp)
struct monst *mtmp; struct monst *mtmp;
{ {
char buf[BUFSZ]; char buf[BUFSZ] = DUMMY;
long offer; long offer;
long umoney = money_cnt(invent); long umoney = money_cnt(invent);
+1 -6
View File
@@ -500,7 +500,7 @@ fixup_special()
s_level *sp = find_level(r->rname.str); s_level *sp = find_level(r->rname.str);
lev = sp->dlevel; lev = sp->dlevel;
} }
/* fall into... */ /*FALLTHRU*/
case LR_UPSTAIR: case LR_UPSTAIR:
case LR_DOWNSTAIR: case LR_DOWNSTAIR:
@@ -1198,11 +1198,6 @@ fumaroles()
* other source files, but they are all so nicely encapsulated here. * other source files, but they are all so nicely encapsulated here.
*/ */
#define CONS_OBJ 0
#define CONS_MON 1
#define CONS_HERO 2
#define CONS_TRAP 3
static struct bubble *bbubbles, *ebubbles; static struct bubble *bbubbles, *ebubbles;
static struct trap *wportal; static struct trap *wportal;
+2 -1
View File
@@ -278,7 +278,7 @@ struct obj *box;
n = 0; n = 0;
break; break;
} }
/*else FALLTHRU*/ /*FALLTHRU*/
case BAG_OF_HOLDING: case BAG_OF_HOLDING:
n = 1; n = 1;
break; break;
@@ -884,6 +884,7 @@ boolean artif;
case LARGE_BOX: case LARGE_BOX:
otmp->olocked = !!(rn2(5)); otmp->olocked = !!(rn2(5));
otmp->otrapped = !(rn2(10)); otmp->otrapped = !(rn2(10));
/*FALLTHRU*/
case ICE_BOX: case ICE_BOX:
case SACK: case SACK:
case OILSKIN_SACK: case OILSKIN_SACK:
+17 -6
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 mon.c $NHDT-Date: 1514769571 2018/01/01 01:19:31 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.246 $ */ /* NetHack 3.6 mon.c $NHDT-Date: 1522540516 2018/03/31 23:55:16 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.250 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -86,14 +86,21 @@ mon_sanity_check()
if (DEADMONSTER(mtmp)) if (DEADMONSTER(mtmp))
continue; continue;
x = mtmp->mx, y = mtmp->my; x = mtmp->mx, y = mtmp->my;
if (!isok(x, y) && !(mtmp->isgd && x == 0 && y == 0)) if (!isok(x, y) && !(mtmp->isgd && x == 0 && y == 0)) {
impossible("mon (%s) claims to be at <%d,%d>?", impossible("mon (%s) claims to be at <%d,%d>?",
fmt_ptr((genericptr_t) mtmp), x, y); fmt_ptr((genericptr_t) mtmp), x, y);
else if (level.monsters[x][y] != mtmp) } else if (mtmp == u.usteed) {
/* steed is in fmon list but not on the map; its
<mx,my> coordinates should match hero's location */
if (x != u.ux || y != u.uy)
impossible("steed (%s) claims to be at <%d,%d>?",
fmt_ptr((genericptr_t) mtmp), x, y);
} else if (level.monsters[x][y] != mtmp) {
impossible("mon (%s) at <%d,%d> is not there!", impossible("mon (%s) at <%d,%d> is not there!",
fmt_ptr((genericptr_t) mtmp), x, y); fmt_ptr((genericptr_t) mtmp), x, y);
else if (mtmp->wormno) } else if (mtmp->wormno) {
sanity_check_worm(mtmp); sanity_check_worm(mtmp);
}
} }
for (x = 0; x < COLNO; x++) for (x = 0; x < COLNO; x++)
@@ -105,6 +112,9 @@ mon_sanity_check()
if (!m) if (!m)
impossible("map mon (%s) at <%d,%d> not in fmon list!", impossible("map mon (%s) at <%d,%d> not in fmon list!",
fmt_ptr((genericptr_t) mtmp), x, y); fmt_ptr((genericptr_t) mtmp), x, y);
else if (mtmp == u.usteed)
impossible("steed (%s) is on the map at <%d,%d>!",
fmt_ptr((genericptr_t) mtmp), x, y);
else if ((mtmp->mx != x || mtmp->my != y) else if ((mtmp->mx != x || mtmp->my != y)
&& mtmp->data != &mons[PM_LONG_WORM]) && mtmp->data != &mons[PM_LONG_WORM])
impossible("map mon (%s) at <%d,%d> is found at <%d,%d>?", impossible("map mon (%s) at <%d,%d> is found at <%d,%d>?",
@@ -3040,7 +3050,8 @@ struct monst *mon;
int shiftflags; int shiftflags;
{ {
struct permonst *ptr = 0; struct permonst *ptr = 0;
unsigned mndx, was_female = mon->female; int mndx;
unsigned was_female = mon->female;
boolean msg = FALSE, dochng = FALSE; boolean msg = FALSE, dochng = FALSE;
if ((shiftflags & SHIFT_MSG) if ((shiftflags & SHIFT_MSG)
@@ -3266,7 +3277,7 @@ struct monst *mon;
/* for debugging: allow control of polymorphed monster */ /* for debugging: allow control of polymorphed monster */
if (wizard && iflags.mon_polycontrol) { if (wizard && iflags.mon_polycontrol) {
char pprompt[BUFSZ], buf[BUFSZ]; char pprompt[BUFSZ], buf[BUFSZ] = DUMMY;
int monclass; int monclass;
Sprintf(pprompt, "Change %s @ %s into what kind of monster?", Sprintf(pprompt, "Change %s @ %s into what kind of monster?",
+2 -2
View File
@@ -1005,7 +1005,7 @@ try_again:
goto try_again; goto try_again;
if (!rn2(3)) if (!rn2(3))
return WAN_TELEPORTATION; return WAN_TELEPORTATION;
/* else FALLTHRU */ /*FALLTHRU*/
case 0: case 0:
case 1: case 1:
return SCR_TELEPORTATION; return SCR_TELEPORTATION;
@@ -1013,7 +1013,7 @@ try_again:
case 10: case 10:
if (!rn2(3)) if (!rn2(3))
return WAN_CREATE_MONSTER; return WAN_CREATE_MONSTER;
/* else FALLTHRU */ /*FALLTHRU*/
case 2: case 2:
return SCR_CREATE_MONSTER; return SCR_CREATE_MONSTER;
case 3: case 3:
+6 -6
View File
@@ -302,7 +302,7 @@ int force;
case THRONE: case THRONE:
if (cansee(x, y)) if (cansee(x, y))
pline_The("throne falls into a chasm."); pline_The("throne falls into a chasm.");
/* Falls into next case */ /*FALLTHRU*/
case ROOM: case ROOM:
case CORR: /* Try to make a pit */ case CORR: /* Try to make a pit */
do_pit: do_pit:
@@ -478,10 +478,10 @@ struct obj *instr;
pc_speaker(&itmp, "C"); pc_speaker(&itmp, "C");
#endif #endif
#define PLAY_NORMAL 0 #define PLAY_NORMAL 0x00
#define PLAY_STUNNED 1 #define PLAY_STUNNED 0x01
#define PLAY_CONFUSED 2 #define PLAY_CONFUSED 0x02
#define PLAY_HALLU 4 #define PLAY_HALLU 0x04
mode = PLAY_NORMAL; mode = PLAY_NORMAL;
if (Stunned) if (Stunned)
mode |= PLAY_STUNNED; mode |= PLAY_STUNNED;
@@ -609,7 +609,7 @@ int
do_play_instrument(instr) do_play_instrument(instr)
struct obj *instr; struct obj *instr;
{ {
char buf[BUFSZ], c = 'y'; char buf[BUFSZ] = DUMMY, c = 'y';
char *s; char *s;
int x, y; int x, y;
boolean ok; boolean ok;
+2 -1
View File
@@ -453,6 +453,7 @@ unsigned cxn_flags; /* bitmask of CXN_xxx values */
case WEAPON_CLASS: case WEAPON_CLASS:
if (is_poisonable(obj) && obj->opoisoned) if (is_poisonable(obj) && obj->opoisoned)
Strcpy(buf, "poisoned "); Strcpy(buf, "poisoned ");
/*FALLTHRU*/
case VENOM_CLASS: case VENOM_CLASS:
case TOOL_CLASS: case TOOL_CLASS:
if (typ == LENSES) if (typ == LENSES)
@@ -3710,7 +3711,7 @@ typfnd:
otmp->spe = (rn2(10) ? -1 : 0); otmp->spe = (rn2(10) ? -1 : 0);
break; break;
} }
/* fall through, if wizard */ /*FALLTHRU*/
default: default:
otmp->spe = spe; otmp->spe = spe;
} }
+12 -10
View File
@@ -27,11 +27,13 @@ NEARDATA struct instance_flags iflags; /* provide linkage */
#define PREFER_TILED FALSE #define PREFER_TILED FALSE
#endif #endif
#define MESSAGE_OPTION 1 enum window_option_types {
#define STATUS_OPTION 2 MESSAGE_OPTION = 1,
#define MAP_OPTION 3 STATUS_OPTION,
#define MENU_OPTION 4 MAP_OPTION,
#define TEXT_OPTION 5 MENU_OPTION,
TEXT_OPTION
};
#define PILE_LIMIT_DFLT 5 #define PILE_LIMIT_DFLT 5
@@ -2836,7 +2838,7 @@ boolean tinitial, tfrom_file;
fullname = "pickup_types"; fullname = "pickup_types";
if (match_optname(opts, fullname, 8, TRUE)) { if (match_optname(opts, fullname, 8, TRUE)) {
char ocl[MAXOCLASSES + 1], tbuf[MAXOCLASSES + 1], qbuf[QBUFSZ], char ocl[MAXOCLASSES + 1], tbuf[MAXOCLASSES + 1], qbuf[QBUFSZ],
abuf[BUFSZ]; abuf[BUFSZ] = DUMMY;
int oc_sym; int oc_sym;
boolean badopt = FALSE, compat = (strlen(opts) <= 6), use_menu; boolean badopt = FALSE, compat = (strlen(opts) <= 6), use_menu;
@@ -4100,7 +4102,7 @@ int
doset() /* changing options via menu by Per Liboriussen */ doset() /* changing options via menu by Per Liboriussen */
{ {
static boolean made_fmtstr = FALSE; static boolean made_fmtstr = FALSE;
char buf[BUFSZ], buf2[BUFSZ]; char buf[BUFSZ], buf2[BUFSZ] = DUMMY;
const char *name; const char *name;
int i = 0, pass, boolcount, pick_cnt, pick_idx, opt_indx; int i = 0, pass, boolcount, pick_cnt, pick_idx, opt_indx;
boolean *bool_p; boolean *bool_p;
@@ -4779,7 +4781,7 @@ boolean setinitial, setfromfile;
iflags.menu_headings = mhattr; iflags.menu_headings = mhattr;
} else if (!strcmp("msgtype", optname)) { } else if (!strcmp("msgtype", optname)) {
int opt_idx, nmt, mttyp; int opt_idx, nmt, mttyp;
char mtbuf[BUFSZ]; char mtbuf[BUFSZ] = DUMMY;
msgtypes_again: msgtypes_again:
nmt = msgtype_count(); nmt = msgtype_count();
@@ -4841,7 +4843,7 @@ boolean setinitial, setfromfile;
} }
} else if (!strcmp("menucolors", optname)) { } else if (!strcmp("menucolors", optname)) {
int opt_idx, nmc, mcclr, mcattr; int opt_idx, nmc, mcclr, mcattr;
char mcbuf[BUFSZ]; char mcbuf[BUFSZ] = DUMMY;
menucolors_again: menucolors_again:
nmc = count_menucolors(); nmc = count_menucolors();
@@ -4912,7 +4914,7 @@ boolean setinitial, setfromfile;
} }
} else if (!strcmp("autopickup_exception", optname)) { } else if (!strcmp("autopickup_exception", optname)) {
int opt_idx, pass, totalapes = 0, numapes[2] = { 0, 0 }; int opt_idx, pass, totalapes = 0, numapes[2] = { 0, 0 };
char apebuf[1 + BUFSZ]; /* so &apebuf[1] is BUFSZ long for getlin() */ char apebuf[1 + BUFSZ] = DUMMY; /* so &apebuf[1] is BUFSZ long for getlin() */
struct autopickup_exception *ape; struct autopickup_exception *ape;
ape_again: ape_again:
+6 -3
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 pager.c $NHDT-Date: 1519529752 2018/02/25 03:35:52 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.120 $ */ /* NetHack 3.6 pager.c $NHDT-Date: 1523142395 2018/04/07 23:06:35 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.123 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -418,6 +418,9 @@ char *buf, *monbuf;
if ((mtmp = m_at(x, y)) != 0) { if ((mtmp = m_at(x, y)) != 0) {
look_at_monster(buf, monbuf, mtmp, x, y); look_at_monster(buf, monbuf, mtmp, x, y);
pm = mtmp->data; pm = mtmp->data;
} else if (Hallucination) {
/* 'monster' must actually be a statue */
Strcpy(buf, rndmonnam((char *) 0));
} }
} else if (glyph_is_object(glyph)) { } else if (glyph_is_object(glyph)) {
look_at_object(buf, x, y, glyph); /* fill in buf[] */ look_at_object(buf, x, y, glyph); /* fill in buf[] */
@@ -481,7 +484,7 @@ char *buf, *monbuf;
Strcpy(buf, "stone"); Strcpy(buf, "stone");
break; break;
} }
/*else FALLTHRU*/ /*FALLTHRU*/
default: default:
Strcpy(buf, defsyms[glyph_to_cmap(glyph)].explanation); Strcpy(buf, defsyms[glyph_to_cmap(glyph)].explanation);
break; break;
@@ -1033,7 +1036,7 @@ coord *click_cc;
{ {
boolean quick = (mode == 1); /* use cursor; don't search for "more info" */ boolean quick = (mode == 1); /* use cursor; don't search for "more info" */
boolean clicklook = (mode == 2); /* right mouse-click method */ boolean clicklook = (mode == 2); /* right mouse-click method */
char out_str[BUFSZ]; char out_str[BUFSZ] = DUMMY;
const char *firstmatch = 0; const char *firstmatch = 0;
struct permonst *pm = 0; struct permonst *pm = 0;
int i = '\0', ans = 0; int i = '\0', ans = 0;
+1 -1
View File
@@ -149,7 +149,7 @@ struct obj *objs;
boolean here; boolean here;
int *menu_on_demand; int *menu_on_demand;
{ {
char ilets[36], inbuf[BUFSZ]; /* FIXME: hardcoded ilets[] length */ char ilets[36], inbuf[BUFSZ] = DUMMY; /* FIXME: hardcoded ilets[] length */
int iletct, oclassct; int iletct, oclassct;
boolean not_everything, filtered; boolean not_everything, filtered;
char qbuf[QBUFSZ]; char qbuf[QBUFSZ];
+1 -1
View File
@@ -384,7 +384,7 @@ void
polyself(psflags) polyself(psflags)
int psflags; int psflags;
{ {
char buf[BUFSZ]; char buf[BUFSZ] = DUMMY;
int old_light, new_light, mntmp, class, tryct; int old_light, new_light, mntmp, class, tryct;
boolean forcecontrol = (psflags == 1), monsterpoly = (psflags == 2), boolean forcecontrol = (psflags == 1), monsterpoly = (psflags == 2),
draconian = (uarm && Is_dragon_armor(uarm)), draconian = (uarm && Is_dragon_armor(uarm)),
+4 -2
View File
@@ -957,6 +957,7 @@ aligntyp g_align;
switch (min(action, 5)) { switch (min(action, 5)) {
case 5: case 5:
pat_on_head = 1; pat_on_head = 1;
/*FALLTHRU*/
case 4: case 4:
do do
fix_worst_trouble(trouble); fix_worst_trouble(trouble);
@@ -1056,7 +1057,7 @@ aligntyp g_align;
break; break;
} }
} }
/* Otherwise, falls into next case */ /*FALLTHRU*/
case 2: case 2:
if (!Blind) if (!Blind)
You("are surrounded by %s glow.", an(hcolor(NH_GOLDEN))); You("are surrounded by %s glow.", an(hcolor(NH_GOLDEN)));
@@ -1148,7 +1149,8 @@ aligntyp g_align;
if (u.ualign.record >= PIOUS && !u.uevent.uhand_of_elbereth) { if (u.ualign.record >= PIOUS && !u.uevent.uhand_of_elbereth) {
gcrownu(); gcrownu();
break; break;
} /* else FALLTHRU */ }
/*FALLTHRU*/
case 6: { case 6: {
struct obj *otmp; struct obj *otmp;
int sp_no, trycnt = u.ulevel + 1; int sp_no, trycnt = u.ulevel + 1;
+2
View File
@@ -471,6 +471,7 @@ char *in_line, *out_line;
/* pluralize */ /* pluralize */
case 'P': case 'P':
cvt_buf[0] = highc(cvt_buf[0]); cvt_buf[0] = highc(cvt_buf[0]);
/*FALLTHRU*/
case 'p': case 'p':
Strcpy(cvt_buf, makeplural(cvt_buf)); Strcpy(cvt_buf, makeplural(cvt_buf));
break; break;
@@ -478,6 +479,7 @@ char *in_line, *out_line;
/* append possessive suffix */ /* append possessive suffix */
case 'S': case 'S':
cvt_buf[0] = highc(cvt_buf[0]); cvt_buf[0] = highc(cvt_buf[0]);
/*FALLTHRU*/
case 's': case 's':
Strcpy(cvt_buf, s_suffix(cvt_buf)); Strcpy(cvt_buf, s_suffix(cvt_buf));
break; break;
+5 -4
View File
@@ -1435,7 +1435,7 @@ struct obj *sobj; /* scroll, or fake spellbook object for scroll-like spell */
if (sblessed) if (sblessed)
do_class_genocide(); do_class_genocide();
else else
do_genocide(!scursed | (2 * !!Confusion)); do_genocide((!scursed) | (2 * !!Confusion));
break; break;
case SCR_LIGHT: case SCR_LIGHT:
if (!confused || rn2(5)) { if (!confused || rn2(5)) {
@@ -1551,6 +1551,7 @@ struct obj *sobj; /* scroll, or fake spellbook object for scroll-like spell */
/* do_mapping() already reveals secret passages */ /* do_mapping() already reveals secret passages */
} }
known = TRUE; known = TRUE;
/*FALLTHRU*/
case SPE_MAGIC_MAPPING: case SPE_MAGIC_MAPPING:
if (level.flags.nommap) { if (level.flags.nommap) {
Your("%s spins as %s blocks the spell!", body_part(HEAD), Your("%s spins as %s blocks the spell!", body_part(HEAD),
@@ -2017,7 +2018,7 @@ STATIC_OVL void
do_class_genocide() do_class_genocide()
{ {
int i, j, immunecnt, gonecnt, goodcnt, class, feel_dead = 0; int i, j, immunecnt, gonecnt, goodcnt, class, feel_dead = 0;
char buf[BUFSZ]; char buf[BUFSZ] = DUMMY;
boolean gameover = FALSE; /* true iff killed self */ boolean gameover = FALSE; /* true iff killed self */
for (j = 0;; j++) { for (j = 0;; j++) {
@@ -2169,7 +2170,7 @@ int how;
/* 3 = forced genocide of player */ /* 3 = forced genocide of player */
/* 5 (4 | 1) = normal genocide from throne */ /* 5 (4 | 1) = normal genocide from throne */
{ {
char buf[BUFSZ]; char buf[BUFSZ] = DUMMY;
register int i, killplayer = 0; register int i, killplayer = 0;
register int mndx; register int mndx;
register struct permonst *ptr; register struct permonst *ptr;
@@ -2425,7 +2426,7 @@ struct obj *from_obj;
boolean boolean
create_particular() create_particular()
{ {
char buf[BUFSZ], *bufp, monclass; char buf[BUFSZ] = DUMMY, *bufp, monclass;
char *tmpp; char *tmpp;
int which, tryct, i, firstchoice = NON_PM; int which, tryct, i, firstchoice = NON_PM;
struct permonst *whichpm = NULL; struct permonst *whichpm = NULL;
+2
View File
@@ -3101,6 +3101,7 @@ xchar x, y;
switch (sell_response ? sell_response : ynaq(qbuf)) { switch (sell_response ? sell_response : ynaq(qbuf)) {
case 'q': case 'q':
sell_response = 'n'; sell_response = 'n';
/*FALLTHRU*/
case 'n': case 'n':
if (container) if (container)
dropped_container(obj, shkp, FALSE); dropped_container(obj, shkp, FALSE);
@@ -3110,6 +3111,7 @@ xchar x, y;
break; break;
case 'a': case 'a':
sell_response = 'y'; sell_response = 'y';
/*FALLTHRU*/
case 'y': case 'y':
if (container) if (container)
dropped_container(obj, shkp, TRUE); dropped_container(obj, shkp, TRUE);
+11
View File
@@ -396,18 +396,21 @@ attrcurse()
You_feel("warmer."); You_feel("warmer.");
break; break;
} }
/*FALLTHRU*/
case 2: case 2:
if (HTeleportation & INTRINSIC) { if (HTeleportation & INTRINSIC) {
HTeleportation &= ~INTRINSIC; HTeleportation &= ~INTRINSIC;
You_feel("less jumpy."); You_feel("less jumpy.");
break; break;
} }
/*FALLTHRU*/
case 3: case 3:
if (HPoison_resistance & INTRINSIC) { if (HPoison_resistance & INTRINSIC) {
HPoison_resistance &= ~INTRINSIC; HPoison_resistance &= ~INTRINSIC;
You_feel("a little sick!"); You_feel("a little sick!");
break; break;
} }
/*FALLTHRU*/
case 4: case 4:
if (HTelepat & INTRINSIC) { if (HTelepat & INTRINSIC) {
HTelepat &= ~INTRINSIC; HTelepat &= ~INTRINSIC;
@@ -416,18 +419,21 @@ attrcurse()
Your("senses fail!"); Your("senses fail!");
break; break;
} }
/*FALLTHRU*/
case 5: case 5:
if (HCold_resistance & INTRINSIC) { if (HCold_resistance & INTRINSIC) {
HCold_resistance &= ~INTRINSIC; HCold_resistance &= ~INTRINSIC;
You_feel("cooler."); You_feel("cooler.");
break; break;
} }
/*FALLTHRU*/
case 6: case 6:
if (HInvis & INTRINSIC) { if (HInvis & INTRINSIC) {
HInvis &= ~INTRINSIC; HInvis &= ~INTRINSIC;
You_feel("paranoid."); You_feel("paranoid.");
break; break;
} }
/*FALLTHRU*/
case 7: case 7:
if (HSee_invisible & INTRINSIC) { if (HSee_invisible & INTRINSIC) {
HSee_invisible &= ~INTRINSIC; HSee_invisible &= ~INTRINSIC;
@@ -435,18 +441,21 @@ attrcurse()
: "thought you saw something"); : "thought you saw something");
break; break;
} }
/*FALLTHRU*/
case 8: case 8:
if (HFast & INTRINSIC) { if (HFast & INTRINSIC) {
HFast &= ~INTRINSIC; HFast &= ~INTRINSIC;
You_feel("slower."); You_feel("slower.");
break; break;
} }
/*FALLTHRU*/
case 9: case 9:
if (HStealth & INTRINSIC) { if (HStealth & INTRINSIC) {
HStealth &= ~INTRINSIC; HStealth &= ~INTRINSIC;
You_feel("clumsy."); You_feel("clumsy.");
break; break;
} }
/*FALLTHRU*/
case 10: case 10:
/* intrinsic protection is just disabled, not set back to 0 */ /* intrinsic protection is just disabled, not set back to 0 */
if (HProtection & INTRINSIC) { if (HProtection & INTRINSIC) {
@@ -454,12 +463,14 @@ attrcurse()
You_feel("vulnerable."); You_feel("vulnerable.");
break; break;
} }
/*FALLTHRU*/
case 11: case 11:
if (HAggravate_monster & INTRINSIC) { if (HAggravate_monster & INTRINSIC) {
HAggravate_monster &= ~INTRINSIC; HAggravate_monster &= ~INTRINSIC;
You_feel("less attractive."); You_feel("less attractive.");
break; break;
} }
/*FALLTHRU*/
default: default:
break; break;
} }
+4 -3
View File
@@ -113,8 +113,8 @@ dosounds()
You_hear("someone searching."); You_hear("someone searching.");
break; break;
} }
/* fall into... (yes, even for hallucination) */
} }
/*FALLTHRU*/
case 0: case 0:
You_hear("the footsteps of a guard on patrol."); You_hear("the footsteps of a guard on patrol.");
break; break;
@@ -662,7 +662,8 @@ register struct monst *mtmp;
else else
pline_msg = "mews."; pline_msg = "mews.";
break; break;
} /* else FALLTHRU */ }
/*FALLTHRU*/
case MS_GROWL: case MS_GROWL:
pline_msg = mtmp->mpeaceful ? "snarls." : "growls!"; pline_msg = mtmp->mpeaceful ? "snarls." : "growls!";
break; break;
@@ -764,7 +765,7 @@ register struct monst *mtmp;
} }
break; break;
} }
/* else FALLTHRU */ /*FALLTHRU*/
case MS_HUMANOID: case MS_HUMANOID:
if (!mtmp->mpeaceful) { if (!mtmp->mpeaceful) {
if (In_endgame(&u.uz) && is_mplayer(ptr)) if (In_endgame(&u.uz) && is_mplayer(ptr))
+58 -44
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 sp_lev.c $NHDT-Date: 1519399521 2018/02/23 15:25:21 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.96 $ */ /* NetHack 3.6 sp_lev.c $NHDT-Date: 1522701334 2018/04/02 20:35:34 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.97 $ */
/* Copyright (c) 1989 by Jean-Christophe Collet */ /* Copyright (c) 1989 by Jean-Christophe Collet */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -52,6 +52,7 @@ STATIC_DCL void FDECL(set_wall_property, (XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P,
STATIC_DCL void NDECL(shuffle_alignments); STATIC_DCL void NDECL(shuffle_alignments);
STATIC_DCL void NDECL(count_features); STATIC_DCL void NDECL(count_features);
STATIC_DCL void NDECL(remove_boundary_syms); STATIC_DCL void NDECL(remove_boundary_syms);
STATIC_DCL void FDECL(set_door_orientation, (int, int));
STATIC_DCL void FDECL(maybe_add_door, (int, int, struct mkroom *)); STATIC_DCL void FDECL(maybe_add_door, (int, int, struct mkroom *));
STATIC_DCL void NDECL(link_doors_rooms); STATIC_DCL void NDECL(link_doors_rooms);
STATIC_DCL void NDECL(fill_rooms); STATIC_DCL void NDECL(fill_rooms);
@@ -702,7 +703,55 @@ remove_boundary_syms()
} }
} }
void /* used by sel_set_door() and link_doors_rooms() */
STATIC_OVL void
set_door_orientation(x, y)
int x, y;
{
boolean wleft, wright, wup, wdown;
/* If there's a wall or door on either the left side or right
* side (or both) of this secret door, make it be horizontal.
*
* It is feasible to put SDOOR in a corner, tee, or crosswall
* position, although once the door is found and opened it won't
* make a lot sense (diagonal access required). Still, we try to
* handle that as best as possible. For top or bottom tee, using
* horizontal is the best we can do. For corner or crosswall,
* either horizontal or vertical are just as good as each other;
* we produce horizontal for corners and vertical for crosswalls.
* For left or right tee, using vertical is best.
*
* A secret door with no adjacent walls is also feasible and makes
* even less sense. It will be displayed as a vertical wall while
* hidden and become a vertical door when found. Before resorting
* to that, we check for solid rock which hasn't been wallified
* yet (cf lower leftside of leader's room in Cav quest).
*/
wleft = (isok(x - 1, y) && (IS_WALL(levl[x - 1][y].typ)
|| IS_DOOR(levl[x - 1][y].typ)
|| levl[x - 1][y].typ == SDOOR));
wright = (isok(x + 1, y) && (IS_WALL(levl[x + 1][y].typ)
|| IS_DOOR(levl[x + 1][y].typ)
|| levl[x + 1][y].typ == SDOOR));
wup = (isok(x, y - 1) && (IS_WALL(levl[x][y - 1].typ)
|| IS_DOOR(levl[x][y - 1].typ)
|| levl[x][y - 1].typ == SDOOR));
wdown = (isok(x, y + 1) && (IS_WALL(levl[x][y + 1].typ)
|| IS_DOOR(levl[x][y + 1].typ)
|| levl[x][y + 1].typ == SDOOR));
if (!wleft && !wright && !wup && !wdown) {
/* out of bounds is treated as implicit wall; should be academic
because we don't expect to have doors so near the level's edge */
wleft = (!isok(x - 1, y) || IS_DOORJOIN(levl[x - 1][y].typ));
wright = (!isok(x + 1, y) || IS_DOORJOIN(levl[x + 1][y].typ));
wup = (!isok(x, y - 1) || IS_DOORJOIN(levl[x][y - 1].typ));
wdown = (!isok(x, y + 1) || IS_DOORJOIN(levl[x][y + 1].typ));
}
levl[x][y].horizontal = ((wleft || wright) && !(wup && wdown)) ? 1 : 0;
}
STATIC_OVL void
maybe_add_door(x, y, droom) maybe_add_door(x, y, droom)
int x, y; int x, y;
struct mkroom *droom; struct mkroom *droom;
@@ -711,7 +760,7 @@ struct mkroom *droom;
add_door(x, y, droom); add_door(x, y, droom);
} }
void STATIC_OVL void
link_doors_rooms() link_doors_rooms()
{ {
int x, y; int x, y;
@@ -720,6 +769,11 @@ link_doors_rooms()
for (y = 0; y < ROWNO; y++) for (y = 0; y < ROWNO; y++)
for (x = 0; x < COLNO; x++) for (x = 0; x < COLNO; x++)
if (IS_DOOR(levl[x][y].typ) || levl[x][y].typ == SDOOR) { if (IS_DOOR(levl[x][y].typ) || levl[x][y].typ == SDOOR) {
/* in case this door was a '+' or 'S' from the
MAP...ENDMAP section without an explicit DOOR
directive, set/clear levl[][].horizontal for it */
set_door_orientation(x, y);
for (tmpi = 0; tmpi < nroom; tmpi++) { for (tmpi = 0; tmpi < nroom; tmpi++) {
maybe_add_door(x, y, &rooms[tmpi]); maybe_add_door(x, y, &rooms[tmpi]);
for (m = 0; m < rooms[tmpi].nsubrooms; m++) { for (m = 0; m < rooms[tmpi].nsubrooms; m++) {
@@ -4213,7 +4267,6 @@ genericptr_t arg;
{ {
xchar typ = *(xchar *) arg; xchar typ = *(xchar *) arg;
xchar x = dx, y = dy; xchar x = dx, y = dy;
boolean wleft, wright, wup, wdown;
if (!IS_DOOR(levl[x][y].typ) && levl[x][y].typ != SDOOR) if (!IS_DOOR(levl[x][y].typ) && levl[x][y].typ != SDOOR)
levl[x][y].typ = (typ & D_SECRET) ? SDOOR : DOOR; levl[x][y].typ = (typ & D_SECRET) ? SDOOR : DOOR;
@@ -4222,46 +4275,7 @@ genericptr_t arg;
if (typ < D_CLOSED) if (typ < D_CLOSED)
typ = D_CLOSED; typ = D_CLOSED;
} }
set_door_orientation(x, y); /* set/clear levl[x][y].horizontal */
/* If there's a wall or door on either the left side or right
* side (or both) of this secret door, make it be horizontal.
*
* It is feasible to put SDOOR in a corner, tee, or crosswall
* position, although once the door is found and opened it won't
* make a lot sense (diagonal access required). Still, we try to
* handle that as best as possible. For top or bottom tee, using
* horizontal is the best we can do. For corner or crosswall,
* either horizontal or vertical are just as good as each other;
* we produce horizontal for corners and vertical for crosswalls.
* For left or right tee, using vertical is best.
*
* A secret door with no adjacent walls is also feasible and makes
* even less sense. It will be displayed as a vertical wall while
* hidden and become a vertical door when found. Before resorting
* to that, we check for solid rock which hasn't been wallified
* yet (cf lower leftside of leader's room in Cav quest).
*/
wleft = (isok(x - 1, y) && (IS_WALL(levl[x - 1][y].typ)
|| IS_DOOR(levl[x - 1][y].typ)
|| levl[x - 1][y].typ == SDOOR));
wright = (isok(x + 1, y) && (IS_WALL(levl[x + 1][y].typ)
|| IS_DOOR(levl[x + 1][y].typ)
|| levl[x + 1][y].typ == SDOOR));
wup = (isok(x, y - 1) && (IS_WALL(levl[x][y - 1].typ)
|| IS_DOOR(levl[x][y - 1].typ)
|| levl[x][y - 1].typ == SDOOR));
wdown = (isok(x, y + 1) && (IS_WALL(levl[x][y + 1].typ)
|| IS_DOOR(levl[x][y + 1].typ)
|| levl[x][y + 1].typ == SDOOR));
if (!wleft && !wright && !wup && !wdown) {
/* out of bounds is treated as implicit wall; should be academic
because we don't expect to have doors so near the level's edge */
wleft = (!isok(x - 1, y) || IS_DOORJOIN(levl[x - 1][y].typ));
wright = (!isok(x + 1, y) || IS_DOORJOIN(levl[x + 1][y].typ));
wup = (!isok(x, y - 1) || IS_DOORJOIN(levl[x][y - 1].typ));
wdown = (!isok(x, y + 1) || IS_DOORJOIN(levl[x][y + 1].typ));
}
levl[x][y].horizontal = ((wleft || wright) && !(wup && wdown)) ? 1 : 0;
levl[x][y].doormask = typ; levl[x][y].doormask = typ;
SpLev_Map[x][y] = 1; SpLev_Map[x][y] = 1;
} }
+15 -10
View File
@@ -1343,26 +1343,31 @@ losespells()
* are learned, they get inserted into sorted order rather than be * are learned, they get inserted into sorted order rather than be
* appended to the end of the list? * appended to the end of the list?
*/ */
static const char *spl_sortchoices[] = { enum spl_sort_types {
SORTBY_LETTER = 0,
SORTBY_ALPHA,
SORTBY_LVL_LO,
SORTBY_LVL_HI,
SORTBY_SKL_AL,
SORTBY_SKL_LO,
SORTBY_SKL_HI,
SORTBY_CURRENT,
SORTRETAINORDER,
NUM_SPELL_SORTBY
};
static const char *spl_sortchoices[NUM_SPELL_SORTBY] = {
"by casting letter", "by casting letter",
#define SORTBY_LETTER 0
"alphabetically", "alphabetically",
#define SORTBY_ALPHA 1
"by level, low to high", "by level, low to high",
#define SORTBY_LVL_LO 2
"by level, high to low", "by level, high to low",
#define SORTBY_LVL_HI 3
"by skill group, alphabetized within each group", "by skill group, alphabetized within each group",
#define SORTBY_SKL_AL 4
"by skill group, low to high level within group", "by skill group, low to high level within group",
#define SORTBY_SKL_LO 5
"by skill group, high to low level within group", "by skill group, high to low level within group",
#define SORTBY_SKL_HI 6
"maintain current ordering", "maintain current ordering",
#define SORTBY_CURRENT 7
/* a menu choice rather than a sort choice */ /* a menu choice rather than a sort choice */
"reassign casting letters to retain current order", "reassign casting letters to retain current order",
#define SORTRETAINORDER 8
}; };
static int spl_sortmode = 0; /* index into spl_sortchoices[] */ static int spl_sortmode = 0; /* index into spl_sortchoices[] */
static int *spl_orderindx = 0; /* array of spl_book[] indices */ static int *spl_orderindx = 0; /* array of spl_book[] indices */
+1
View File
@@ -485,6 +485,7 @@ int reason; /* Player was thrown off etc. */
switch (reason) { switch (reason) {
case DISMOUNT_THROWN: case DISMOUNT_THROWN:
verb = "are thrown"; verb = "are thrown";
/*FALLTHRU*/
case DISMOUNT_FELL: case DISMOUNT_FELL:
You("%s off of %s!", verb, mon_nam(mtmp)); You("%s off of %s!", verb, mon_nam(mtmp));
if (!have_spot) if (!have_spot)
+16 -3
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 teleport.c $NHDT-Date: 1455140444 2016/02/10 21:40:44 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.66 $ */ /* NetHack 3.6 teleport.c $NHDT-Date: 1523306912 2018/04/09 20:48:32 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.73 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -609,12 +609,22 @@ level_tele()
Strcpy(qbuf, "To what level do you want to teleport?"); Strcpy(qbuf, "To what level do you want to teleport?");
do { do {
if (iflags.menu_requested) {
/* wizard mode 'm ^V' skips prompting on first pass
(note: level Tport via menu won't have any second pass) */
iflags.menu_requested = FALSE;
if (wizard)
goto levTport_menu;
}
if (++trycnt == 2) { if (++trycnt == 2) {
if (wizard) if (wizard)
Strcat(qbuf, " [type a number, name, or ? for a menu]"); Strcat(qbuf, " [type a number, name, or ? for a menu]");
else else
Strcat(qbuf, " [type a number or name]"); Strcat(qbuf, " [type a number or name]");
} }
*buf = '\0'; /* EDIT_GETLIN: if we're on second or later pass,
the previous input was invalid so don't use it
as getlin()'s preloaded default answer */
getlin(qbuf, buf); getlin(qbuf, buf);
if (!strcmp(buf, "\033")) { /* cancelled */ if (!strcmp(buf, "\033")) { /* cancelled */
if (Confusion && rnl(5)) { if (Confusion && rnl(5)) {
@@ -629,9 +639,12 @@ level_tele()
goto random_levtport; goto random_levtport;
} }
if (wizard && !strcmp(buf, "?")) { if (wizard && !strcmp(buf, "?")) {
schar destlev = 0; schar destlev;
xchar destdnum = 0; xchar destdnum;
levTport_menu:
destlev = 0;
destdnum = 0;
newlev = (int) print_dungeon(TRUE, &destlev, &destdnum); newlev = (int) print_dungeon(TRUE, &destlev, &destdnum);
if (!newlev) if (!newlev)
return; return;
+1 -1
View File
@@ -2465,7 +2465,7 @@ register struct monst *mtmp;
mtmp->mtrapped = 1; mtmp->mtrapped = 1;
break; break;
} }
/* fall though */ /*FALLTHRU*/
default: default:
if (mptr->mlet == S_GIANT if (mptr->mlet == S_GIANT
/* exclude baby dragons and relatively short worms */ /* exclude baby dragons and relatively short worms */
+1
View File
@@ -2396,6 +2396,7 @@ register struct monst *mon;
|| youmonst.data->mlet == S_ORC || youmonst.data->mlet == S_ORC
|| youmonst.data->mlet == S_GNOME) && !weapon_used) || youmonst.data->mlet == S_GNOME) && !weapon_used)
goto use_weapon; goto use_weapon;
/*FALLTHRU*/
case AT_NONE: case AT_NONE:
case AT_BOOM: case AT_BOOM:
+1 -1
View File
@@ -230,7 +230,7 @@ invault()
guard = findgd(); guard = findgd();
if (++u.uinvault % VAULT_GUARD_TIME == 0 && !guard) { if (++u.uinvault % VAULT_GUARD_TIME == 0 && !guard) {
/* if time ok and no guard now. */ /* if time ok and no guard now. */
char buf[BUFSZ]; char buf[BUFSZ] = DUMMY;
register int x, y, dd, gx, gy; register int x, y, dd, gx, gy;
int lx = 0, ly = 0; int lx = 0, ly = 0;
long umoney; long umoney;
+1 -1
View File
@@ -391,7 +391,7 @@ register struct monst *mtmp;
mtmp->mhp += rnd(8); mtmp->mhp += rnd(8);
return 1; return 1;
} }
/* fall through :-) */ /*FALLTHRU*/
case STRAT_NONE: /* harass */ case STRAT_NONE: /* harass */
if (!rn2(!mtmp->mflee ? 5 : 33)) if (!rn2(!mtmp->mflee ? 5 : 33))
+1 -1
View File
@@ -95,7 +95,7 @@ dowrite(pen)
register struct obj *pen; register struct obj *pen;
{ {
register struct obj *paper; register struct obj *paper;
char namebuf[BUFSZ], *nm, *bp; char namebuf[BUFSZ] = DUMMY, *nm, *bp;
register struct obj *new_obj; register struct obj *new_obj;
int basecost, actualcost; int basecost, actualcost;
int curseval; int curseval;
+5 -2
View File
@@ -2408,6 +2408,7 @@ boolean ordinary;
case WAN_LIGHT: /* (broken wand) */ case WAN_LIGHT: /* (broken wand) */
/* assert( !ordinary ); */ /* assert( !ordinary ); */
damage = d(obj->spe, 25); damage = d(obj->spe, 25);
/*FALLTHRU*/
case EXPENSIVE_CAMERA: case EXPENSIVE_CAMERA:
if (!damage) if (!damage)
damage = 5; damage = 5;
@@ -4138,7 +4139,8 @@ boolean say; /* Announce out of sight hit/miss events if true */
switch (bounce) { switch (bounce) {
case 0: case 0:
dx = -dx; /* fall into... */ dx = -dx;
/*FALLTHRU*/
case 1: case 1:
dy = -dy; dy = -dy;
break; break;
@@ -5050,7 +5052,8 @@ int triesleft;
void void
makewish() makewish()
{ {
char buf[BUFSZ], promptbuf[BUFSZ]; static char buf[BUFSZ] = DUMMY;
char promptbuf[BUFSZ];
struct obj *otmp, nothing; struct obj *otmp, nothing;
int tries = 0; int tries = 0;
+3 -3
View File
@@ -503,7 +503,7 @@ int yy_flex_debug = 0;
#define YY_MORE_ADJ 0 #define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET #define YY_RESTORE_YY_MORE_OFFSET
char *yytext; char *yytext;
/* NetHack 3.6 dgn_comp.l $NHDT-Date: 1455415233 2016/02/14 02:00:33 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.19 $ */ /* 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) 1989 by Jean-Christophe Collet */
/* Copyright (c) 1990 by M. Stephenson */ /* Copyright (c) 1990 by M. Stephenson */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -617,7 +617,7 @@ extern int yywrap FDECL(FDECL_dummy, (void ));
#ifndef YY_NO_UNPUT #ifndef YY_NO_UNPUT
static void yyunput FDECL(FDECL_dummy, (int c,char *buf_ptr )); void yyunput FDECL(FDECL_dummy, (int c,char *buf_ptr ));
#endif #endif
#ifndef yytext_ptr #ifndef yytext_ptr
@@ -1282,7 +1282,7 @@ static yy_state_type yy_try_NUL_trans (yy_current_state )
#ifndef YY_NO_UNPUT #ifndef YY_NO_UNPUT
static void yyunput (c,yy_bp ) void yyunput (c,yy_bp )
int c; int c;
char * yy_bp; char * yy_bp;
{ {
+3 -3
View File
@@ -1024,7 +1024,7 @@ int yy_flex_debug = 0;
#define YY_MORE_ADJ 0 #define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET #define YY_RESTORE_YY_MORE_OFFSET
char *yytext; char *yytext;
/* NetHack 3.6 lev_comp.l $NHDT-Date: 1455415237 2016/02/14 02:00:37 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.27 $ */ /* NetHack 3.6 lev_comp.l $NHDT-Date: 1522193683 2018/03/27 23:34:43 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.28 $ */
/* Copyright (c) 1989 by Jean-Christophe Collet */ /* Copyright (c) 1989 by Jean-Christophe Collet */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -1161,7 +1161,7 @@ extern int yywrap FDECL(FDECL_dummy, (void ));
#ifndef YY_NO_UNPUT #ifndef YY_NO_UNPUT
static void yyunput FDECL(FDECL_dummy, (int c,char *buf_ptr )); void yyunput FDECL(FDECL_dummy, (int c,char *buf_ptr ));
#endif #endif
#ifndef yytext_ptr #ifndef yytext_ptr
@@ -2525,7 +2525,7 @@ static yy_state_type yy_try_NUL_trans (yy_current_state )
#ifndef YY_NO_UNPUT #ifndef YY_NO_UNPUT
static void yyunput (c,yy_bp ) void yyunput (c,yy_bp )
int c; int c;
char * yy_bp; char * yy_bp;
{ {
+5 -3
View File
@@ -27,9 +27,11 @@ PSCMD = groff
# Use the "cat" GUIDECMD if nroff and/or tbl and/or col are not installed # Use the "cat" GUIDECMD if nroff and/or tbl and/or col are not installed
# Not appropriate for creating Guidebook.txt. # Not appropriate for creating Guidebook.txt.
# GUIDECMD = cat Guidebook.txt # GUIDECMD = cat Guidebook.txt
# The following works better with groff-1.18, eg on Linux #
# GUIDECMD = $(GUIDE_PREFORMAT) | nroff -c -Tascii | $(COLCMD) # Single page. Might need adjustment to .pl value
GUIDECMD = $(GUIDE_PREFORMAT) | nroff | $(COLCMD) # GUIDECMD= $(GUIDE_PREFORMAT) | perl -pe 's/^(.mt)$$/.pl 4720v\n.in 0\n.po 8\n.ll 64m\n$$1/' | nroff -c -Tascii | $(COLCMD)
#
GUIDECMD = $(GUIDE_PREFORMAT) | nroff -c -Tascii | $(COLCMD)
# Only generate output for the current configuration: # Only generate output for the current configuration:
NHGREP = $(MAKEDEFS) --grep --input - --output - NHGREP = $(MAKEDEFS) --grep --input - --output -
+10 -3
View File
@@ -1,5 +1,5 @@
# Makefile for NetHack's utility programs. # Makefile for NetHack's utility programs.
# NetHack 3.6 Makefile.utl $NHDT-Date: 1454712070 2016/02/05 22:41:10 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.29 $ # NetHack 3.6 Makefile.utl $NHDT-Date: 1522193681 2018/03/27 23:34:41 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.34 $
# Root of source tree: # Root of source tree:
NHSROOT=.. NHSROOT=..
@@ -271,12 +271,18 @@ lev_yacc.c: lev_comp.y
lev_lex.c: lev_comp.l lev_lex.c: lev_comp.l
$(LEX) $(FLEXDIST) lev_comp.l $(LEX) $(FLEXDIST) lev_comp.l
sed -e 's#"$(LEXYYC)"#"$@"#' -e 's# *$$##' $(LEXYYC) > $@ \ sed -e 's#"$(LEXYYC)"#"$@"#' -e 's# *$$##' \
-e 's#static void yyunput#void yyunput#' $(LEXYYC) > $@ \
&& rm $(LEXYYC) && rm $(LEXYYC)
# note: flex code construction using m4 macros results in some trailing # note: flex code construction using m4 macros results in some trailing
# spaces; <space><space><star> is basic RE substitute for <space><plus> # spaces; <space><space><star> is basic RE substitute for <space><plus>
# and we don't bother stripping trailing tabs because that gets messy; # and we don't bother stripping trailing tabs because that gets messy;
# make expands <dollar><dollar> into <dollar> which is RE end-of-line. # make expands <dollar><dollar> into <dollar> 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 # with all of extern.h's functions to complain about, we drown in
# 'defined but not used' without -u # 'defined but not used' without -u
@@ -308,7 +314,8 @@ dgn_yacc.c: dgn_comp.y
dgn_lex.c: dgn_comp.l dgn_lex.c: dgn_comp.l
$(LEX) $(FLEXDIST) dgn_comp.l $(LEX) $(FLEXDIST) dgn_comp.l
sed -e 's#"$(LEXYYC)"#"$@"#' -e 's# *$$##' $(LEXYYC) > $@ \ sed -e 's#"$(LEXYYC)"#"$@"#' -e 's# *$$##' \
-e 's#static void yyunput#void yyunput#' $(LEXYYC) > $@ \
&& rm $(LEXYYC) && rm $(LEXYYC)
# note: <space><space><star> is basic RE substitute for <space><plus> # note: <space><space><star> is basic RE substitute for <space><plus>
+1
View File
@@ -2789,6 +2789,7 @@ do_objs()
prefix = -1; prefix = -1;
break; break;
} }
/*FALLTHRU*/
default: default:
Fprintf(ofp, "#define\t"); Fprintf(ofp, "#define\t");
} }
+3
View File
@@ -83,6 +83,9 @@ bool NetHackQtStringRequestor::Get(char* buffer, int maxchar)
resize(fontMetrics().width(prompt.text())*2+50,fontMetrics().height()*4); resize(fontMetrics().width(prompt.text())*2+50,fontMetrics().height()*4);
} }
#ifdef EDIT_GETLIN
input.setText(buffer);
#endif
centerOnMain(this); centerOnMain(this);
show(); show();
input.setFocus(); input.setFocus();
+4
View File
@@ -1623,7 +1623,11 @@ char *input;
slide left hiding some chars at the beginning of the response but slide left hiding some chars at the beginning of the response but
making room to type more. [Prior to 3.6.1, width wasn't specifiable making room to type more. [Prior to 3.6.1, width wasn't specifiable
and answer box always got sized to match the width of the prompt.] */ and answer box always got sized to match the width of the prompt.] */
#ifdef EDIT_GETLIN
SetDialogResponse(getline_dialog, input, 60); /* set default answer */
#else
SetDialogResponse(getline_dialog, nhStr(""), 60); /* set default answer */ SetDialogResponse(getline_dialog, nhStr(""), 60); /* set default answer */
#endif
positionpopup(getline_popup, TRUE); /* center,bottom */ positionpopup(getline_popup, TRUE); /* center,bottom */
nh_XtPopup(getline_popup, (int) XtGrabExclusive, getline_dialog); nh_XtPopup(getline_popup, (int) XtGrabExclusive, getline_dialog);
+14 -2
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 getline.c $NHDT-Date: 1490908467 2017/03/30 21:14:27 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.31 $ */ /* NetHack 3.6 getline.c $NHDT-Date: 1523619111 2018/04/13 11:31:51 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.35 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -56,8 +56,19 @@ getlin_hook_proc hook;
cw->flags &= ~WIN_STOP; cw->flags &= ~WIN_STOP;
ttyDisplay->toplin = 3; /* special prompt state */ ttyDisplay->toplin = 3; /* special prompt state */
ttyDisplay->inread++; ttyDisplay->inread++;
/* issue the prompt */
custompline(OVERRIDE_MSGTYPE | SUPPRESS_HISTORY, "%s ", query); custompline(OVERRIDE_MSGTYPE | SUPPRESS_HISTORY, "%s ", query);
*obufp = 0; #ifdef EDIT_GETLIN
/* bufp is input/output; treat current contents (presumed to be from
previous getlin()) as default input */
addtopl(obufp);
bufp = eos(obufp);
#else
/* !EDIT_GETLIN: bufp is output only; init it to empty */
*bufp = '\0';
#endif
for (;;) { for (;;) {
(void) fflush(stdout); (void) fflush(stdout);
Strcat(strcat(strcpy(toplines, query), " "), obufp); Strcat(strcat(strcpy(toplines, query), " "), obufp);
@@ -285,6 +296,7 @@ tty_get_ext_cmd()
* ? ext_cmd_getlin_hook * ? ext_cmd_getlin_hook
* : (getlin_hook_proc) 0); * : (getlin_hook_proc) 0);
*/ */
buf[0] = '\0';
hooked_tty_getlin("#", buf, in_doagain ? (getlin_hook_proc) 0 hooked_tty_getlin("#", buf, in_doagain ? (getlin_hook_proc) 0
: ext_cmd_getlin_hook); : ext_cmd_getlin_hook);
(void) mungspaces(buf); (void) mungspaces(buf);
+2
View File
@@ -1171,6 +1171,7 @@ int n;
case ATR_ULINE: case ATR_ULINE:
if (nh_US) if (nh_US)
return nh_US; return nh_US;
/*FALLTHRU*/
case ATR_BOLD: case ATR_BOLD:
case ATR_BLINK: case ATR_BLINK:
#if defined(TERMLIB) && defined(TEXTCOLOR) #if defined(TERMLIB) && defined(TEXTCOLOR)
@@ -1192,6 +1193,7 @@ int n;
case ATR_ULINE: case ATR_ULINE:
if (nh_UE) if (nh_UE)
return nh_UE; return nh_UE;
/*FALLTHRU*/
case ATR_BOLD: case ATR_BOLD:
case ATR_BLINK: case ATR_BLINK:
return nh_HE; return nh_HE;
+4 -2
View File
@@ -1527,7 +1527,7 @@ winid window;
case NHW_MAP: case NHW_MAP:
/* cheap -- clear the whole thing and tell nethack to redraw botl */ /* cheap -- clear the whole thing and tell nethack to redraw botl */
context.botlx = 1; context.botlx = 1;
/* fall into ... */ /*FALLTHRU*/
case NHW_BASE: case NHW_BASE:
clear_screen(); clear_screen();
break; break;
@@ -1917,7 +1917,8 @@ struct WinDesc *cw;
/* special case: '0' is also the default ball class */ /* special case: '0' is also the default ball class */
if (!counting && index(gacc, morc)) if (!counting && index(gacc, morc))
goto group_accel; goto group_accel;
/* fall through to count the zero */ /* fall through to count the zero */
/*FALLTHRU*/
case '1': case '1':
case '2': case '2':
case '3': case '3':
@@ -2197,6 +2198,7 @@ boolean blocking; /* with ttys, all windows are blocking */
tty_display_nhwindow(WIN_MESSAGE, TRUE); tty_display_nhwindow(WIN_MESSAGE, TRUE);
return; return;
} }
/*FALLTHRU*/
case NHW_BASE: case NHW_BASE:
(void) fflush(stdout); (void) fflush(stdout);
break; break;
+5
View File
@@ -1657,8 +1657,13 @@ mswin_getlin(const char *question, char *input)
mswin_clear_nhwindow(WIN_MESSAGE); mswin_clear_nhwindow(WIN_MESSAGE);
mswin_putstr_ex(WIN_MESSAGE, ATR_BOLD, question, 0); mswin_putstr_ex(WIN_MESSAGE, ATR_BOLD, question, 0);
mswin_putstr_ex(WIN_MESSAGE, ATR_BOLD, " ", 1); mswin_putstr_ex(WIN_MESSAGE, ATR_BOLD, " ", 1);
#ifdef EDIT_GETLIN
mswin_putstr_ex(WIN_MESSAGE, ATR_BOLD, input, 0);
len = strlen(input);
#else
input[0] = '\0'; input[0] = '\0';
len = 0; len = 0;
#endif
ShowCaret(mswin_hwnd_from_winid(WIN_MESSAGE)); ShowCaret(mswin_hwnd_from_winid(WIN_MESSAGE));
done = FALSE; done = FALSE;
while (!done) { while (!done) {