Amiga: route port paths through fqname()
Tile loading hard-coded "NetHack:tiles/tiles{16,32}.iff" and PORT_HELP
hard-coded "nethack:amii.hlp". Route through fqname(DATAPREFIX) so
DATADIR= overrides apply. Refresh amii.hlp to 5.0 content, ship it via
amigapkg, and document HACKDIR / SAVEDIR / BONESDIR examples in
nethack.cnf.
This commit is contained in:
+1
-1
@@ -86,7 +86,7 @@ extern void ami_wininit_data(int);
|
|||||||
#define AMII_MAXCOLORS (1L << DEPTH)
|
#define AMII_MAXCOLORS (1L << DEPTH)
|
||||||
typedef unsigned short AMII_COLOR_TYPE;
|
typedef unsigned short AMII_COLOR_TYPE;
|
||||||
|
|
||||||
#define PORT_HELP "nethack:amii.hlp"
|
#define PORT_HELP "amii.hlp"
|
||||||
|
|
||||||
#undef TERMLIB
|
#undef TERMLIB
|
||||||
|
|
||||||
|
|||||||
+57
-25
@@ -1,31 +1,63 @@
|
|||||||
Amiga-specific help file for NetHack 3.6
|
Amiga-specific help for NetHack 5.0
|
||||||
|
|
||||||
The Amiga port of NetHack supports a number of additional commands
|
|
||||||
and facilities specific to the Amiga. Listed below are the things
|
|
||||||
which are either specific to the Amiga port or might not appear
|
|
||||||
in other ports.
|
|
||||||
|
|
||||||
While playing NetHack you can press:
|
Special key combinations
|
||||||
|
------------------------
|
||||||
|
ALT-HELP Edit the screen colour palette.
|
||||||
|
CTL-HELP Set tile scaling and clipping (amiv only).
|
||||||
|
SHIFT-HELP Toggle the dungeon overview window (amiv only).
|
||||||
|
|
||||||
ALT-HELP Color requestor.
|
|
||||||
CTL-HELP Scale display (amitile only).
|
|
||||||
SHIFT-HELP Overview window (amitile only).
|
|
||||||
|
|
||||||
Amiga-specific run-time options:
|
Command-line flags
|
||||||
altmeta use the alt keys as meta keys
|
------------------
|
||||||
flush throw away keyboard type-ahead
|
-L Force interlaced (tall) screen.
|
||||||
|
-l Force non-interlaced screen.
|
||||||
|
|
||||||
Command line options recognized are
|
The usual core flags (-D, -X, -u, -p, -r, -@) apply too.
|
||||||
|
|
||||||
-n No News at game startup.
|
|
||||||
-X Play in discovery mode.
|
Configuration (nethack.cnf in the NetHack: drawer)
|
||||||
-D Play in debug mode.
|
--------------------------------------------------
|
||||||
-L Interlaced screen.
|
Window backend selection:
|
||||||
-l Never Interlaced screen.
|
|
||||||
-u Play as player given as
|
OPTIONS=windowtype:amiv tile graphics (default)
|
||||||
an argument.
|
OPTIONS=windowtype:amii text/character mode
|
||||||
-r Pick a race given as an
|
|
||||||
argument.
|
Amiga-specific runtime options:
|
||||||
-p Pick a profession given
|
|
||||||
as an argument
|
OPTIONS=altmeta ALT+letter sends META+letter (default on).
|
||||||
-? Gives command line usage.
|
Disable with !altmeta if your keymap needs
|
||||||
|
ALT for typing accented characters.
|
||||||
|
OPTIONS=flush drop any keys queued during long operations
|
||||||
|
OPTIONS=asksavedisk prompt for a save-disk before saving
|
||||||
|
(MFLOPPY only)
|
||||||
|
|
||||||
|
|
||||||
|
File-location overrides
|
||||||
|
-----------------------
|
||||||
|
NetHack: is automatically assigned to the directory the executable was
|
||||||
|
launched from. All game files default to that volume. Override any of
|
||||||
|
these in nethack.cnf to relocate parts of the game state:
|
||||||
|
|
||||||
|
HACKDIR=NetHack: program / shared data
|
||||||
|
LEVELDIR=NetHack: per-level files during play
|
||||||
|
SAVEDIR=NetHack:save/ save files
|
||||||
|
BONESDIR=NetHack:bones/ bones files (shared between games)
|
||||||
|
DATADIR=NetHack: nhdat and other data files
|
||||||
|
SCOREDIR=NetHack: record / logfile
|
||||||
|
LOCKDIR=NetHack: lock files
|
||||||
|
CONFIGDIR=NetHack: per-user config
|
||||||
|
|
||||||
|
You can also override the install path entirely without editing the cnf
|
||||||
|
by setting the NETHACKDIR or HACKDIR shell environment variable before
|
||||||
|
launching:
|
||||||
|
|
||||||
|
setenv NETHACKDIR Work:games/nethack-dev/
|
||||||
|
Work:games/nethack-dev/nethack
|
||||||
|
|
||||||
|
|
||||||
|
Display fallback
|
||||||
|
----------------
|
||||||
|
Tile mode (amiv) requires at least 16 colours and ~384 KB free chip
|
||||||
|
RAM. If neither is available the game falls back to text mode (amii)
|
||||||
|
at startup with a one-line note.
|
||||||
|
|||||||
+6
-4
@@ -59,15 +59,17 @@ struct TextFont *TextsFont = NULL;
|
|||||||
struct TextFont *HackFont = NULL;
|
struct TextFont *HackFont = NULL;
|
||||||
struct TextFont *RogueFont = NULL;
|
struct TextFont *RogueFont = NULL;
|
||||||
|
|
||||||
UBYTE FontName[] = "NetHack:hack.font";
|
/* hack.font is registered via NetHack:hack.font (which references
|
||||||
/* # chars in "NetHack:": */
|
* NetHack:hack/8). OpenFont()/SetFont() take the bare name; only
|
||||||
#define SIZEOF_DISKNAME 8
|
* OpenDiskFont() needs the full path. */
|
||||||
|
UBYTE HackFontName[] = "hack.font";
|
||||||
|
UBYTE HackFontPath[] = "NetHack:hack.font";
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct TextAttr Hack80 = {
|
struct TextAttr Hack80 = {
|
||||||
#ifdef HACKFONT
|
#ifdef HACKFONT
|
||||||
&FontName[SIZEOF_DISKNAME],
|
HackFontName,
|
||||||
#else
|
#else
|
||||||
(UBYTE *) "topaz.font",
|
(UBYTE *) "topaz.font",
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -47,3 +47,17 @@ MENUCOLOR="gray dragon scale"=cyan
|
|||||||
MENUCOLOR="speed boots"=magenta
|
MENUCOLOR="speed boots"=magenta
|
||||||
MENUCOLOR="luckstone"=green
|
MENUCOLOR="luckstone"=green
|
||||||
MENUCOLOR="unicorn horn"=green
|
MENUCOLOR="unicorn horn"=green
|
||||||
|
|
||||||
|
# *** FILE LOCATIONS ***
|
||||||
|
# NetHack: is auto-assigned to the directory the binary was launched
|
||||||
|
# from, so all game files default there. Uncomment any of these to
|
||||||
|
# relocate part of the game state to a different volume or subdir.
|
||||||
|
#
|
||||||
|
#HACKDIR=NetHack:
|
||||||
|
#LEVELDIR=NetHack:
|
||||||
|
#SAVEDIR=NetHack:save/
|
||||||
|
#BONESDIR=NetHack:bones/
|
||||||
|
#DATADIR=NetHack:
|
||||||
|
#SCOREDIR=NetHack:
|
||||||
|
#LOCKDIR=NetHack:
|
||||||
|
#CONFIGDIR=NetHack:
|
||||||
|
|||||||
@@ -100,7 +100,6 @@ CLIPPING must be defined for the AMIGA version
|
|||||||
#define NewWindow ExtNewWindow
|
#define NewWindow ExtNewWindow
|
||||||
#define NewScreen ExtNewScreen
|
#define NewScreen ExtNewScreen
|
||||||
|
|
||||||
#define SIZEOF_DISKNAME 8
|
|
||||||
|
|
||||||
#define CSI '\x9b'
|
#define CSI '\x9b'
|
||||||
#define NO_CHAR -1
|
#define NO_CHAR -1
|
||||||
|
|||||||
@@ -1012,9 +1012,11 @@ amii_init_nhwindows(int *argcp, char **argv)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if (DiskfontBase = OpenLibrary("diskfont.library", amii_libvers)) {
|
if (DiskfontBase = OpenLibrary("diskfont.library", amii_libvers)) {
|
||||||
Hack80.ta_Name -= SIZEOF_DISKNAME;
|
extern UBYTE HackFontName[], HackFontPath[];
|
||||||
|
|
||||||
|
Hack80.ta_Name = HackFontPath;
|
||||||
HackFont = OpenDiskFont(&Hack80);
|
HackFont = OpenDiskFont(&Hack80);
|
||||||
Hack80.ta_Name += SIZEOF_DISKNAME;
|
Hack80.ta_Name = HackFontName;
|
||||||
|
|
||||||
/* Textsfont13 is filled in with "FONT=" settings. The default is
|
/* Textsfont13 is filled in with "FONT=" settings. The default is
|
||||||
* courier/13.
|
* courier/13.
|
||||||
@@ -1025,9 +1027,9 @@ amii_init_nhwindows(int *argcp, char **argv)
|
|||||||
|
|
||||||
/* Try hack/8 for texts if no user specified font */
|
/* Try hack/8 for texts if no user specified font */
|
||||||
if (TextsFont == NULL) {
|
if (TextsFont == NULL) {
|
||||||
Hack80.ta_Name -= SIZEOF_DISKNAME;
|
Hack80.ta_Name = HackFontPath;
|
||||||
TextsFont = OpenDiskFont(&Hack80);
|
TextsFont = OpenDiskFont(&Hack80);
|
||||||
Hack80.ta_Name += SIZEOF_DISKNAME;
|
Hack80.ta_Name = HackFontName;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If no fonts, make everything topaz 8 for non-view windows.
|
/* If no fonts, make everything topaz 8 for non-view windows.
|
||||||
@@ -1205,10 +1207,10 @@ amii_init_nhwindows(int *argcp, char **argv)
|
|||||||
if (WINVERS_AMIV) {
|
if (WINVERS_AMIV) {
|
||||||
extern char *tilefile;
|
extern char *tilefile;
|
||||||
if (amii_numcolors >= 32) {
|
if (amii_numcolors >= 32) {
|
||||||
tilefile = "NetHack:tiles/tiles32.iff";
|
tilefile = (char *) fqname("tiles/tiles32.iff", DATAPREFIX, 0);
|
||||||
amii_numcolors = 32;
|
amii_numcolors = 32;
|
||||||
} else {
|
} else {
|
||||||
tilefile = "NetHack:tiles/tiles16.iff";
|
tilefile = (char *) fqname("tiles/tiles16.iff", DATAPREFIX, 0);
|
||||||
}
|
}
|
||||||
amii_bmhd = ReadTileImageFiles();
|
amii_bmhd = ReadTileImageFiles();
|
||||||
} else
|
} else
|
||||||
@@ -1967,7 +1969,7 @@ removetopl(int cnt)
|
|||||||
void
|
void
|
||||||
port_help(void)
|
port_help(void)
|
||||||
{
|
{
|
||||||
display_file(PORT_HELP, 1);
|
display_file(fqname(PORT_HELP, DATAPREFIX, 0), 1);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -321,6 +321,7 @@ amigapkg: $(AMITILES) ../util/uudecode
|
|||||||
( cd $(TARGETPFX)pkg/NetHack && ../../../../util/uudecode ../../../../sys/amiga/amifont.uu )
|
( cd $(TARGETPFX)pkg/NetHack && ../../../../util/uudecode ../../../../sys/amiga/amifont.uu )
|
||||||
cp $(AMISRC)/nethack.cnf $(TARGETPFX)pkg/NetHack/nethack.cnf
|
cp $(AMISRC)/nethack.cnf $(TARGETPFX)pkg/NetHack/nethack.cnf
|
||||||
cp $(AMISRC)/README.amiga $(TARGETPFX)pkg/NetHack/README.amiga
|
cp $(AMISRC)/README.amiga $(TARGETPFX)pkg/NetHack/README.amiga
|
||||||
|
cp $(AMISRC)/amii.hlp $(TARGETPFX)pkg/NetHack/amii.hlp
|
||||||
( cd $(TARGETPFX)pkg/NetHack && ../../../../util/uudecode ../../../../sys/amiga/NHinfo.uu )
|
( cd $(TARGETPFX)pkg/NetHack && ../../../../util/uudecode ../../../../sys/amiga/NHinfo.uu )
|
||||||
( cd $(TARGETPFX)pkg/NetHack && ../../../../util/uudecode ../../../../sys/amiga/cnf-info.uu )
|
( cd $(TARGETPFX)pkg/NetHack && ../../../../util/uudecode ../../../../sys/amiga/cnf-info.uu )
|
||||||
( cd $(TARGETPFX)pkg/NetHack && ../../../../util/uudecode ../../../../sys/amiga/license-info.uu )
|
( cd $(TARGETPFX)pkg/NetHack && ../../../../util/uudecode ../../../../sys/amiga/license-info.uu )
|
||||||
|
|||||||
Reference in New Issue
Block a user