darren@bacchus.UUCP (Darren Friedlein) (01/08/88)
I looked at Eric Raymond's NetHack patches and decided that our changes were different enough to warrant my posting of this version. The README file goes over everything you should need to know. -Darren G. Friedlein (The following is a VERY rudimentary shell archive. I can't seem to find a shar program on this machine - very odd...) ---- Cut Here ---- echo x - README sed 's/^X//' >README <<'*-*-END-of-README-*-*' XThe differences between this set of font changes and Eric Raymond's Xare... X X_Good points_ X1) This version lets you redefine any object on the screen. This includes Xmonsters, walls, floor and objects. X2) I thought about testing for whether NH was being run on the system Xconsole or a remote terminal to turn switching on/off (and load in Xthe hack font automatically), but by leaving these out, someone Xplaying NH on a remote UNIXpc can use the new character (more on this Xlater). X X_Bad points_ X3) The wall scheme was simplified. X4) I didn't use the existing DECgraphics routines - this doesn't seem to Xmake any difference on the main console or on a local (fast) terminal, Xbut I'm sure it's slow over the modem and a blatent waste of time Xrequired to update screen. X5) See 2 - can only be used by terminals that will switch the font or Xignore ^N and ^O (adm3a, etc.). X XA few more misc. notes: XRUNNING WITH NEW FONTS FROM A REMOTE UNIX-PC: Just load in the new hack Xfont as if you were going to play locally, dial up the remote machine and Xstart playing. XMIMIC THING FIXED (WAS IT BROKEN?): In trying to squeeze out as many Xcharacters as I could, I realized that the ']' (a character I was trying Xto use) was being used to represent the mimic. Somehow this is too easy. XI turned it back into a '[' and used the ']' for something else (ghost). XPEOPLE USING DIFFERENT SYSTEM FONTS: I know that everyone doesn't use Xthe default system font. I myself prefer the prior7x9in9x12 font Xposted recently while the other person who worked with me on this doing Xthe monster characters (Danny Rappleyea), likes the system.8 font. For Xthis reason, I have included a program (fontmix) which will add the new Xchanges to the base set of your choice [Yes - I'm affraid that all the Xmonsters have not been re-done (not by a far shot) and the letters still Xshow up a lot]. X X**** XI haven't had a chance to test this very much, but if there's a problem, Xsend me mail and I'll try to get a patch out to you. X**** X XAfter unpacking this archive, you should be left with the following files: Xfontmix.c used to add new font "pieces" to existing font. Xnew.mons file containing definitions for new monster characters. Xnew.objs ditto - for the object characters. Xnh.diffs diffs to add to orriginal sources. Xmknhfont (should be chmod 755) installs the new font changes in the X font of your choice. X XOK - Now - here are the steps to installing the changes: X X1) mv nh.diffs to your NetHack sources directory and type: X patch <nh.diffs X (if you don't have patch, you'll have to install them by hand - it's X just a few lines.) X X2) compile fontmix.c with the command: X cc fontmix.c -o fontmix X (I don't think optomizing does anything.) X X3) go into whatever directory you feel safe in (/tmp is good) and take X new.* and mknhfont with you (make sure fontmix is in the directory X or in the search path). Decide what font you're going to use X (usually system.8.ft) and type: X mknhfont <fontname> X X4) this is a bit tricky. go to wherever you define HACKOPTIONS X (probably .profile) and get it into your favorite editor. At the X end, add the graphics option as such: X HACKOPTIONS="nam... ...,graphics:' ------C.#<>^}{|'" X here's the tricky part! see that 'C' in the above string, you need to X change that to the square block you get when you hit the Break key X (otherwise known as the DELETE character - ASCII value 127). In uEMACS, X I acomplish this by pressing ^Q before the Break key. I'm not sure X about how to do this in vi or ed, but it is vitally important that the X change be made! X X5) re- make NetHack. X X6) find an easy way to load the font and execute nethack. I do this in my X .profile with the command: X function nethack { X setf /usr/lib/wfont/hack.ft 1 X /usr/games/nethack X } X but it could also be accomplished with a shell file. X XWell - you're done. If you a chance, send me some feedback on whether you Xfeel this was a wortwhile thing to post or just a waste of phone time. If Xenough people are using this or another of the 2-font hack things, I'll Xpost new monsters as I come up with them. X X-Darren X X/****** /***** {edo} Darren G. Friedlein X * * /****** * {mcnc} Rt 4 Box 416, Durham NC 27703 X * * * * {ethos} data(bacchus):919/596-7746 X * *urham \*****\ * ompany {gladys} voice:919/596-9492 X\****** *oftware \***** {bakerst}!bacchus!darren X ******/ *-*-END-of-README-*-* echo x - fontmix.c sed 's/^X//' >fontmix.c <<'*-*-END-of-fontmix.c-*-*' X/* fontmix - combine two font files - send output to STDOUT */ X X/* Warning: fontmix doesn't check to see if the file argument */ X/* exists or is readable. If it freezes, you know! :-) */ X X#include <stdio.h> X#include <string.h> X X#define NONSENSE "ThisIsAGarbageString" X#define CHARHEADER "###############" X#define MAXLEN 80 X Xmain(argc, argv) Xint argc; Xchar **argv; X{ X FILE *fonta, *fontb; X char linea[MAXLEN], lineb[MAXLEN], tempstr[MAXLEN]; X X if (argc<2) { X fprintf(stderr, "Usage: %s <fontpieces> <oldfont >newfont\n", argv[0]); X exit(1); X } X X fonta = stdin; X fontb = fopen(argv[1], "r"); X X strcpy(tempstr, CHARHEADER); X X while (!feof(fonta)) { X X do { X if (feof(fontb)) X strcpy(lineb, NONSENSE); X else X fgets(lineb, MAXLEN, fontb); X } while (strncmp(lineb, tempstr, 15) && !feof(fontb)); X X while (strcmp(linea,lineb) && !feof(fonta)) { X fgets(linea, MAXLEN, fonta); X if (!feof(fonta)) X printf("%s", linea); X } X X while ((lineb[1] != '\0') && !feof(fontb)) { X fgets(lineb, MAXLEN, fontb); X if (!feof(fontb)) X printf("%s", lineb); X } X X while ((linea[1] != '\0') && !feof(fonta)) X fgets(linea, MAXLEN, fonta); X X } Xreturn(0); X} X X/****** /***** {edo} Darren G. Friedlein X * * /****** * {mcnc} Rt 4 Box 416, Durham NC 27703 X * * * * {ethos} data(bacchus):919/596-7746 X * *urham \*****\ * ompany {gladys} voice:919/596-9492 X\****** *oftware \***** {bakerst}!bacchus!darren X ******/ *-*-END-of-fontmix.c-*-* echo x - mknhfont sed 's/^X//' >mknhfont <<'*-*-END-of-mknhfont-*-*' Xcfont /usr/lib/wfont/$1 | fontmix new.objs | fontmix new.mons >hack.ascii Xcfont hack.ascii >/usr/lib/wfont/hack.ft *-*-END-of-mknhfont-*-* echo x - new.mons sed 's/^X//' >new.mons <<'*-*-END-of-new.mons-*-*' XNew Monsters for NetHACK v2.2 w/ UNIXPC patches X XLast Modified: 1/5/87 (Danny A. Rappleyea) X X############### Character 0x32, 062, 50 2 2 2 2 2 2 2 2 2 2 Xchar 50 Xhs 9 Xvs 9 Xha 0 Xva -9 Xhi 9 Xvi 0 Xbits ********* Xbits * ** Xbits * * * Xbits * * * Xbits * * * Xbits * * * Xbits * * * Xbits * ** Xbits ********* X X############### Character 0x42, 0102, 66 B B B B B B B B B B Xchar 66 Xhs 9 Xvs 11 Xha 0 Xva -10 Xhi 9 Xvi 0 Xbits ** Xbits ** Xbits * * Xbits * * Xbits ** *** Xbits * * Xbits ** *** Xbits * * Xbits * * Xbits ** Xbits ** X X############### Character 0x45, 0105, 69 E E E E E E E E E E Xchar 69 Xhs 9 Xvs 12 Xha 0 Xva -10 Xhi 9 Xvi 0 Xbits * * * Xbits * * * Xbits * * ** Xbits * * * Xbits **** Xbits * * Xbits * * Xbits * *** * Xbits * *** * Xbits * * Xbits * * Xbits *** X X############### Character 0x4c, 0114, 76 L L L L L L L L L L Xchar 76 Xhs 7 Xvs 10 Xha 1 Xva -9 Xhi 9 Xvi 0 Xbits * * Xbits * *** Xbits * * * * Xbits * ** Xbits * * Xbits * ** Xbits * * * * Xbits * *** Xbits * * Xbits ******* X X############### Character 0x4e, 0116, 78 N N N N N N N N N N Xchar 78 Xhs 9 Xvs 12 Xha 0 Xva -10 Xhi 9 Xvi 0 Xbits * Xbits * * * Xbits * * * * Xbits * * * * Xbits * * * * Xbits ******* * Xbits ******* * Xbits ********* Xbits ******** Xbits ***** Xbits **** Xbits **** X X############### Character 0x58, 0130, 88 X X X X X X X X X X Xchar 88 Xhs 9 Xvs 10 Xha 0 Xva -9 Xhi 9 Xvi 0 Xbits ** Xbits ** Xbits * ** ** Xbits ** ** *** Xbits ****** Xbits ******** Xbits ******** Xbits ****** Xbits ** ** ** Xbits ** ** ** X X############### Character 0x61, 0141, 97 a a a a a a a a a a Xchar 97 Xhs 9 Xvs 8 Xha 0 Xva -8 Xhi 9 Xvi 0 Xbits *** Xbits **** ** Xbits ** ***** Xbits ********* Xbits ***** *** Xbits * ***** Xbits ***** * Xbits *** X X############### Character 0x66, 0146, 102 f f f f f f f f f f Xchar 102 Xhs 9 Xvs 9 Xha 0 Xva -9 Xhi 9 Xvi 0 Xbits * Xbits * * * Xbits * Xbits *** * Xbits * *** * Xbits * ** * Xbits * * * Xbits * Xbits * * X X############### Character 0x6e, 0156, 110 n n n n n n n n n n Xchar 110 Xhs 7 Xvs 12 Xha 1 Xva -9 Xhi 9 Xvi 0 Xbits * Xbits * * Xbits * Xbits *** Xbits **** Xbits **** Xbits ** Xbits *** Xbits *** Xbits ** Xbits ** Xbits *** X X############### Character 0x70, 0160, 112 p p p p p p p p p p Xchar 112 Xhs 9 Xvs 12 Xha 0 Xva -9 Xhi 9 Xvi 0 Xbits ********* Xbits * * Xbits * * Xbits * * Xbits * * Xbits * * Xbits * * Xbits * * Xbits * * Xbits * * Xbits * * Xbits * X X############### Character 0x75, 0165, 117 u u u u u u u u u u Xchar 117 Xhs 9 Xvs 9 Xha 0 Xva -8 Xhi 9 Xvi 0 Xbits * Xbits ** Xbits *** Xbits ** Xbits **** Xbits ** Xbits **** Xbits ** Xbits *** X X############### Character 0x76, 0166, 118 v v v v v v v v v v Xchar 118 Xhs 9 Xvs 7 Xha 0 Xva -6 Xhi 9 Xvi 0 Xbits ***** Xbits * * Xbits * * Xbits ** ** Xbits * * Xbits * * Xbits * * X X############### Character 0x79, 0171, 121 y y y y y y y y y y Xchar 121 Xhs 8 Xvs 8 Xha 0 Xva -8 Xhi 9 Xvi 0 Xbits * * Xbits * * Xbits Xbits ** Xbits ** Xbits Xbits * * Xbits * * *-*-END-of-new.mons-*-* echo x - new.objs sed 's/^X//' >new.objs <<'*-*-END-of-new.objs-*-*' XNew Objects for NetHACK v2.2 w/ UNIXPC patches X XLast Modified: 1/6/87 (Darren G. Friedlein) X X############### Character 0x21, 041, 33 ! ! ! ! ! ! ! ! ! ! Xchar 33 Xhs 9 Xvs 10 Xha 0 Xva -9 Xhi 9 Xvi 0 Xbits ***** Xbits * * Xbits * * Xbits * * Xbits * * Xbits * * Xbits * * Xbits * * Xbits * * Xbits ******* X X############### Character 0x22, 042, 34 " " " " " " " " " " Xchar 34 Xhs 9 Xvs 11 Xha 0 Xva -10 Xhi 9 Xvi 0 Xbits * *** * Xbits * * Xbits ** * * ** Xbits * * * Xbits * * * Xbits *** * *** Xbits ** * ** Xbits * * * * Xbits * *** * Xbits ** * ** Xbits *** X X############### Character 0x23, 043, 35 # # # # # # # # # # Xchar 35 Xhs 9 Xvs 12 Xha 0 Xva -10 Xhi 9 Xvi 0 Xbits * * * Xbits * * * Xbits * * * Xbits * * * Xbits * * * Xbits * * * Xbits * * * Xbits * * * Xbits * * * Xbits * * * Xbits * * * Xbits * * * X X############### Character 0x24, 044, 36 $ $ $ $ $ $ $ $ $ $ Xchar 36 Xhs 9 Xvs 9 Xha 0 Xva -9 Xhi 9 Xvi 0 Xbits ***** Xbits * * Xbits * *** * Xbits * * * Xbits * * * Xbits * * * Xbits * *** * Xbits * * Xbits ***** X X############### Character 0x25, 045, 37 % % % % % % % % % % Xchar 37 Xhs 9 Xvs 10 Xha 0 Xva -9 Xhi 9 Xvi 0 Xbits ***** Xbits ******* Xbits ******* Xbits ******* Xbits ******** Xbits ********* Xbits **** *** Xbits **** *** Xbits ********* Xbits ****** X X############### Character 0x28, 050, 40 ( ( ( ( ( ( ( ( ( ( Xchar 40 Xhs 5 Xvs 6 Xha 3 Xva -6 Xhi 9 Xvi 0 Xbits * Xbits * Xbits ***** Xbits * Xbits * Xbits * X X############### Character 0x29, 051, 41 ) ) ) ) ) ) ) ) ) ) Xchar 41 Xhs 7 Xvs 11 Xha 1 Xva -10 Xhi 9 Xvi 0 Xbits * Xbits *** Xbits *** Xbits *** Xbits *** Xbits *** Xbits *** Xbits *** Xbits ******* Xbits *** Xbits *** X X############### Character 0x2a, 052, 42 * * * * * * * * * * Xchar 42 Xhs 9 Xvs 7 Xha 0 Xva -8 Xhi 9 Xvi 0 Xbits ***** Xbits * * Xbits * * Xbits * * Xbits * * Xbits * * Xbits * X X############### Character 0x2b, 053, 43 + + + + + + + + + + Xchar 43 Xhs 9 Xvs 11 Xha 0 Xva -9 Xhi 9 Xvi 0 Xbits ******* Xbits * ** Xbits * *** * * Xbits * * * * Xbits * *** * * Xbits * * * * Xbits * *** * * Xbits * * * Xbits ******* * Xbits * ** Xbits ******* X X############### Character 0x2d, 055, 45 - - - - - - - - - - Xchar 45 Xhs 7 Xvs 10 Xha 1 Xva -9 Xhi 9 Xvi 0 Xbits ******* Xbits ******* Xbits ******* Xbits ******* Xbits ******* Xbits ******* Xbits ******* Xbits ******* Xbits ******* Xbits ******* X X############### Character 0x2e, 056, 46 . . . . . . . . . . Xchar 46 Xhs 9 Xvs 11 Xha 0 Xva -10 Xhi 9 Xvi 0 Xbits * * * Xbits Xbits * * * Xbits Xbits * * * Xbits Xbits * * * Xbits Xbits * * * Xbits Xbits * * * X X############### Character 0x2f, 057, 47 / / / / / / / / / / Xchar 47 Xhs 9 Xvs 9 Xha 0 Xva -9 Xhi 9 Xvi 0 Xbits * Xbits * * Xbits * * Xbits *** Xbits *** Xbits *** Xbits *** Xbits *** Xbits *** X X############### Character 0x3c, 074, 60 < < < < < < < < < < Xchar 60 Xhs 9 Xvs 12 Xha 0 Xva -10 Xhi 9 Xvi 0 Xbits * Xbits *** Xbits * * * Xbits * *** Xbits * * Xbits * Xbits **** Xbits * Xbits * Xbits **** Xbits * Xbits * X X############### Character 0x3d, 075, 61 = = = = = = = = = = Xchar 61 Xhs 9 Xvs 10 Xha 0 Xva -10 Xhi 9 Xvi 0 Xbits * * * Xbits * * Xbits * Xbits ***** Xbits * * Xbits * * Xbits * * Xbits * * Xbits * * Xbits ***** X X############### Character 0x3e, 076, 62 > > > > > > > > > > Xchar 62 Xhs 9 Xvs 12 Xha 0 Xva -10 Xhi 9 Xvi 0 Xbits * Xbits * Xbits * * * Xbits *** *** Xbits * * Xbits * Xbits **** Xbits * Xbits * Xbits **** Xbits * Xbits * X X############### Character 0x3f, 077, 63 ? ? ? ? ? ? ? ? ? ? Xchar 63 Xhs 8 Xvs 12 Xha 1 Xva -10 Xhi 9 Xvi 0 Xbits ** Xbits ** Xbits ******** Xbits * * Xbits * * Xbits * * Xbits * * Xbits * * Xbits * * Xbits ******** Xbits ** Xbits ** X X############### Character 0x40, 0100, 64 @ @ @ @ @ @ @ @ @ @ Xchar 64 Xhs 7 Xvs 10 Xha 1 Xva -9 Xhi 9 Xvi 0 Xbits ** Xbits * * Xbits * * Xbits ** Xbits ****** Xbits * ** * Xbits * ** * Xbits ** Xbits ** Xbits ** ** X X############### Character 0x5b, 0133, 91 [ [ [ [ [ [ [ [ [ [ Xchar 91 Xhs 8 Xvs 12 Xha 1 Xva -10 Xhi 9 Xvi 0 Xbits ** Xbits * * Xbits * ** * Xbits * ** * Xbits *** *** Xbits * * Xbits * * * * Xbits * * * * Xbits *** *** Xbits *** *** Xbits * ** * Xbits *** *** X X############### Character 0x5c, 0134, 92 \ \ \ \ \ \ \ \ \ \ Xchar 92 Xhs 9 Xvs 12 Xha 0 Xva -10 Xhi 9 Xvi 0 Xbits * Xbits ** Xbits ** Xbits ** Xbits * Xbits ******* Xbits * * Xbits ******** Xbits * * Xbits * * Xbits * * Xbits X X############### Character 0x5d, 0135, 93 ] ] ] ] ] ] ] ] ] ] Xchar 93 Xhs 9 Xvs 10 Xha 0 Xva -9 Xhi 9 Xvi 0 Xbits ** Xbits ****** Xbits ** ** ** Xbits ** ** ** Xbits ******** Xbits ******** Xbits ******** Xbits ******** Xbits ** ** ** Xbits * * * X X############### Character 0x5e, 0136, 94 ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ Xchar 94 Xhs 9 Xvs 6 Xha 0 Xva -6 Xhi 9 Xvi 0 Xbits ******* Xbits ** * Xbits * * * Xbits * * * Xbits * * * Xbits ******* X X############### Character 0x60, 0140, 96 ` ` ` ` ` ` ` ` ` ` Xchar 96 Xhs 9 Xvs 10 Xha 0 Xva -10 Xhi 9 Xvi 0 Xbits *** Xbits ** ** Xbits * * * Xbits * * * Xbits * * * Xbits * * * Xbits * * Xbits * * Xbits * * Xbits ****** X X############### Character 0x7b, 0173, 123 { { { { { { { { { { Xchar 123 Xhs 9 Xvs 9 Xha 0 Xva -9 Xhi 9 Xvi 0 Xbits * * Xbits * * * * Xbits * * * Xbits * Xbits * *** * Xbits ******* Xbits * Xbits *** Xbits ******* X X############### Character 0x7c, 0174, 124 | | | | | | | | | | Xchar 124 Xhs 9 Xvs 12 Xha 0 Xva -10 Xhi 9 Xvi 0 Xbits * * Xbits * *** * Xbits ** ** Xbits * ***** * Xbits ** * ** Xbits * * * * Xbits * * * * Xbits ** * ** Xbits * ***** * Xbits ** ** Xbits * *** * Xbits * * X X############### Character 0x7d, 0175, 125 } } } } } } } } } } Xchar 125 Xhs 9 Xvs 2 Xha 0 Xva -2 Xhi 9 Xvi 0 Xbits * * * Xbits * ** ** * X X############### Character 0x7f, 0177, 127 Xchar 127 Xhs 9 Xvs 12 Xha 0 Xva -10 Xhi 9 Xvi 0 Xbits ********* Xbits * * Xbits * * Xbits * * Xbits * * Xbits * * * Xbits * * * Xbits * * Xbits * * Xbits * * Xbits * * Xbits ********* *-*-END-of-new.objs-*-* echo x - nh.diffs sed 's/^X//' >nh.diffs <<'*-*-END-of-nh.diffs-*-*' X*** orig/makemon.c Tue Jan 5 22:13:52 1988 X--- new/makemon.c Tue Jan 5 21:58:56 1988 X*************** X*** 114,120 X mtmp->mcansee = 1; X if(ptr->mlet == 'M'){ X mtmp->mimic = 1; X! mtmp->mappearance = ']'; X } X if(!in_mklev) { X if(x == u.ux && y == u.uy && ptr->mlet != ' ') X X--- 114,120 ----- X mtmp->mcansee = 1; X if(ptr->mlet == 'M'){ X mtmp->mimic = 1; X! mtmp->mappearance = '['; X } X if(!in_mklev) { X if(x == u.ux && y == u.uy && ptr->mlet != ' ') X X*** orig/monst.c Tue Jan 5 22:13:52 1988 X--- new/monst.c Tue Jan 5 21:58:47 1988 X*************** X*** 94,99 X { "shopkeeper", '@', 12, 18, 0, 50, 4, 8, sizeof(struct eshk) } X }; X X struct permonst pm_ghost = { "ghost", ' ', 10, 3, -5, 50, 1, 1, sizeof(plname) }; X #ifdef SAC X struct permonst pm_wizard = { "wizard of Yendor", '1', 20, 12, -8, 100, 2, 12, 0 }; X X--- 94,102 ----- X { "shopkeeper", '@', 12, 18, 0, 50, 4, 8, sizeof(struct eshk) } X }; X X+ #ifdef UNIXPC X+ struct permonst pm_ghost = { "ghost", ']', 10, 3, -5, 50, 1, 1, sizeof(plname) }; X+ #else X struct permonst pm_ghost = { "ghost", ' ', 10, 3, -5, 50, 1, 1, sizeof(plname) }; X #endif X #ifdef SAC X*************** X*** 95,100 X }; X X struct permonst pm_ghost = { "ghost", ' ', 10, 3, -5, 50, 1, 1, sizeof(plname) }; X #ifdef SAC X struct permonst pm_wizard = { "wizard of Yendor", '1', 20, 12, -8, 100, 2, 12, 0 }; X #else X X--- 98,104 ----- X struct permonst pm_ghost = { "ghost", ']', 10, 3, -5, 50, 1, 1, sizeof(plname) }; X #else X struct permonst pm_ghost = { "ghost", ' ', 10, 3, -5, 50, 1, 1, sizeof(plname) }; X+ #endif X #ifdef SAC X struct permonst pm_wizard = { "wizard of Yendor", '1', 20, 12, -8, 100, 2, 12, 0 }; X #else X X*** orig/pri.c Tue Jan 5 22:13:51 1988 X--- new/pri.c Tue Jan 5 21:58:41 1988 X*************** X*** 99,104 X #ifdef MSDOSCOLOR X hilite(ch); X #else X (void) putchar(ch); X #endif X curx++; X X--- 99,107 ----- X #ifdef MSDOSCOLOR X hilite(ch); X #else X+ #ifdef UNIXPC X+ (void) putchar(14); X+ #endif X (void) putchar(ch); X #ifdef UNIXPC X (void) putchar(15); X*************** X*** 100,105 X hilite(ch); X #else X (void) putchar(ch); X #endif X curx++; X } X X--- 103,110 ----- X (void) putchar(14); X #endif X (void) putchar(ch); X+ #ifdef UNIXPC X+ (void) putchar(15); X #endif X #endif X curx++; X*************** X*** 101,106 X #else X (void) putchar(ch); X #endif X curx++; X } X X X--- 106,112 ----- X #ifdef UNIXPC X (void) putchar(15); X #endif X+ #endif X curx++; X } X *-*-END-of-nh.diffs-*-* exit