add an OS-specific library (see "msdos.c" and "tos.c" as
examples) to provide functions NetHack wants and your OS lacks.
- 4. If your machine uses a new windowing system, follow doc/window.doc
+ 4. If your machine uses a new windowing system, follow doc/window.txt
carefully. Put files implementing these routines in a win or
sys subdirectory as appropriate.
NetHack on one platform for game execution on another.
-# NetHack 3.7 Porting $NHDT-Date: 1596498144 2020/08/03 23:42:24 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.9 $
+# NetHack 3.7 Porting $NHDT-Date: 1643491454 2022/01/29 21:24:14 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.17 $
# Copyright (c) 2005 by Michael Allison
# NetHack may be freely redistributed. See license for details.
*.6 NHSUBST
*.7 NHSUBST
fixes* NHSUBST
-window.doc NHSUBST
+window.txt NHSUBST
config.nh NHSUBST
Guidebook.txt NH_header=no
tmac.n NH_header=no
-NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.734 $ $NHDT-Date: 1641673963 2022/01/08 20:32:43 $
+NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.0 $ $NHDT-Date: 1643491497 2022/01/29 21:24:57 $
General Fixes and Modified Features
-----------------------------------
combined the boolean and compound options into one allopt[] array;
each option has its own individual function for setting the option,
for retrieving the option value, and for processing the option
- following its selection in the 'O' menu, added doc/options.doc file.
+ following its selection in the 'O' menu, added doc/options.txt file.
function reglyph_darkroom() relocated from options.c to display.c
resurrect 'makedefs -m' to be able to derive default mons[].diffculty values
suitable for assigning to new or changed monsters
-NetHack 3.7 window.doc $NHDT-Date: 1615154657 2021/03/07 22:04:17 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.63 $
+NetHack 3.7 window.txt $NHDT-Date: 1643491505 2022/01/29 21:25:05 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.0 $
Introduction
/*
* NOTE: If you add (or delete) an option, please review:
- * doc/options.doc
+ * doc/options.txt
*
* It contains how-to info and outlines some required/suggested
* updates that should accompany your change.
-/* NetHack 3.7 winX.h $NHDT-Date: 1613272633 2021/02/14 03:17:13 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.45 $ */
+/* NetHack 3.7 winX.h $NHDT-Date: 1643491525 2022/01/29 21:25:25 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.52 $ */
/* Copyright (c) Dean Luick, 1992 */
/* NetHack may be freely redistributed. See license for details. */
/*
- * Definitions for the X11 window-port. See doc/window.doc for details on
+ * Definitions for the X11 window-port. See doc/window.txt for details on
* the window interface.
*/
#ifndef WINX_H
-/* NetHack 3.7 display.c $NHDT-Date: 1638622699 2021/12/04 12:58:19 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.165 $ */
+/* NetHack 3.7 display.c $NHDT-Date: 1643491545 2022/01/29 21:25:45 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.174 $ */
/* Copyright (c) Dean Luick, with acknowledgements to Kevin Darcy */
/* and Dave Cohrs, 1990. */
/* NetHack may be freely redistributed. See license for details. */
* what to draw at a given location. The routines for the vision system
* can be found in vision.c and vision.h. The routines for display can
* be found in this file (display.c) and display.h. The drawing routines
- * are part of the window port. See doc/window.doc for the drawing
+ * are part of the window port. See doc/window.txt for the drawing
* interface.
*
* The display system deals with an abstraction called a glyph. Anything
-/* NetHack 3.7 options.c $NHDT-Date: 1642630919 2022/01/19 22:21:59 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.528 $ */
+/* NetHack 3.7 options.c $NHDT-Date: 1643491546 2022/01/29 21:25:46 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.535 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2008. */
/* NetHack may be freely redistributed. See license for details. */
/*
* NOTE: If you add (or delete) an option, please review the following:
- * doc/options.doc
+ * doc/options.txt
*
* It contains how-to info and outlines some required/suggested
* updates that should accompany your change.
The API is two functions:
* `nhmain(int argc, char *argv[])` - The main function for NetHack that configures the program and runs the `moveloop()` until the game is over. The arguments to this function are the [command line arguments](https://nethackwiki.com/wiki/Options) to NetHack.
* `shim_graphics_set_callback(shim_callback_t cb)` - A single function that sets a callback to gather graphics events: write a string to screen, get user input, etc. Your job is to pass in a callback and handle all the requested rendering events to show NetHack on the scrren. The callback is `void shim_callback_t(const char *name, void *ret_ptr, const char *fmt, ...)`
- * `name` is the name of the [window function](https://github.com/NetHack/NetHack/blob/NetHack-3.7/doc/window.doc) that needs to be handled
+ * `name` is the name of the [window function](https://github.com/NetHack/NetHack/blob/NetHack-3.7/doc/window.txt) that needs to be handled
* `ret_ptr` is a pointer to a memory space for the return value. The type expected to be returned in this pointer is described by the first character of the `fmt` string.
* `fmt` is a string that describes the signature of the callback. The first character in the string is the return type and any additional characters describe the variable arguments: `i` for integer, `s` for string, `p` for pointer, `c` for character, `v` for void. For example, if format is "vis" the callback will have no return (void), the first argument will be an integer, and the second argument will be a string. If format is "iii" the callback must return an integer, and both the arguments passed in will be integers.
- * [Variadic arguments](https://www.gnu.org/software/libc/manual/html_node/Variadic-Example.html): a variable number and type of arguments depending on the `window function` that is being called. The arguments associated with each `name` are described in the [NetHack window.doc](https://github.com/NetHack/NetHack/blob/NetHack-3.7/doc/window.doc).
+ * [Variadic arguments](https://www.gnu.org/software/libc/manual/html_node/Variadic-Example.html): a variable number and type of arguments depending on the `window function` that is being called. The arguments associated with each `name` are described in the [NetHack window.txt](https://github.com/NetHack/NetHack/blob/NetHack-3.7/doc/window.txt).
Where is the header file for the API you ask? There isn't one. It's three functions, just drop the forward declarations at the top of your file (or create your own header). It's more work figuring out how to install and copy around header files than it's worth for such a small API. If you disagree, feel free to sumbit a PR to fix it. :)
The WebAssembly API has a similar signature to `libnethack.a` with minor syntactic differences:
* `main(int argc, char argv[])` - The main function for NetHack
* `shim_graphics_set_callback(char *cbName)` - A `String` representing a name of a callback function. The callback function be registered as `globalThis[cbName] = function yourCallback(name, ... args) { /* your stuff */ }`. Note that [globalThis](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis) points to `window` in browsers and `global` in node.js.
- * `name` is the name of the [window function](https://github.com/NetHack/NetHack/blob/NetHack-3.7/doc/window.doc) that needs to be handled
- * `... args` is a variable number and type of arguments depending on the `window function` that is being called. The arguments associated with each `name` are described in the [NetHack window.doc](https://github.com/NetHack/NetHack/blob/NetHack-3.7/doc/window.doc)
+ * `name` is the name of the [window function](https://github.com/NetHack/NetHack/blob/NetHack-3.7/doc/window.txt) that needs to be handled
+ * `... args` is a variable number and type of arguments depending on the `window function` that is being called. The arguments associated with each `name` are described in the [NetHack window.txt](https://github.com/NetHack/NetHack/blob/NetHack-3.7/doc/window.txt)
* The function must return the value expected for the specified `name`
-/* NetHack 3.7 winX.c $NHDT-Date: 1643328675 2022/01/28 00:11:15 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.109 $ */
+/* NetHack 3.7 winX.c $NHDT-Date: 1643491577 2022/01/29 21:26:17 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.110 $ */
/* Copyright (c) Dean Luick, 1992 */
/* NetHack may be freely redistributed. See license for details. */
/*
* "Main" file for the X window-port. This contains most of the interface
- * routines. Please see doc/window.doc for an description of the window
+ * routines. Please see doc/window.txt for an description of the window
* interface.
*/
* Each condition bit must only ever appear in one of the
* CLR_ array members, but can appear in multiple HL_ATTCLR_
* offsets (because more than one attribute can co-exist).
- * See doc/window.doc for more details.
+ * See doc/window.txt for more details.
*/
static int changed_fields = 0;
-/* NetHack 3.7 wintty.c $NHDT-Date: 1608861214 2020/12/25 01:53:34 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.264 $ */
+/* NetHack 3.7 wintty.c $NHDT-Date: 1643491577 2022/01/29 21:26:17 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.282 $ */
/* Copyright (c) David Cohrs, 1991 */
/* NetHack may be freely redistributed. See license for details. */
* Each condition bit must only ever appear in one of the
* CLR_ array members, but can appear in multiple HL_ATTCLR_
* offsets (because more than one attribute can co-exist).
- * See doc/window.doc for more details.
+ * See doc/window.txt for more details.
*/
DISABLE_WARNING_FORMAT_NONLITERAL