[comp.sources.games] v10i015: umoria3 - single player dungeon simulation

billr@saab.CNA.TEK.COM (Bill Randle) (06/05/90)

Submitted-by: wilson@ernie.Berkeley.EDU (Jim Wilson)
Posting-number: Volume 10, Issue 15
Archive-name: umoria3/Patch1a
Patch-To: umoria3: Volume 9, Issue 55-86

This patch has fixes for:
* the invisible/invincible monster/player bug
* a bug triggered by climbing stairs while search mode is enabled
* a bug that occasionally occurs when reading the 'Door Creation' scroll
* numerous problems with the IBM-PC Turbo C support
* numerous problems with the Macintosh MPW C support
* a new version of the util/printit program for pretty printing object and
  monster descriptions
* the Mac ScrnMgr.doc file which had lines much longer than 80 characters,
  and all files that did not end with a newline character

Copy the 3 patch file parts to the top level umoria directory, and unshar
them there.  There are 7 files which are replaced, the shar file renames
the old copies with a '.old' extension.

See the NOTES01 file after you have unshared the 3 parts for more info.

Jim Wilson
wilson@ernie.Berkeley.EDU

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 1 (of 3)."
# Contents:  MANIFEST.P1 patches01 source/tables.c util/printit
# Wrapped by wilson@atlas on Wed May 30 14:19:58 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'MANIFEST.P1' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'MANIFEST.P1'\"
else
echo shar: Extracting \"'MANIFEST.P1'\" \(610 characters\)
sed "s/^X//" >'MANIFEST.P1' <<'END_OF_FILE'
X   File Name		Archive #	Description
X-----------------------------------------------------------
X MANIFEST.P1                1	This shipping list
X NOTES01                    3	
X ibmpc/turbo_c.inf          3	
X mac/MakeFile.hqx           2	
X mac/dumpres/MakeFile.hqx   2	
X mac/resource.hqx           3	
X mac/scrnmgr/MakeFile.hqx   3	
X mac/scrnmgr/ScrnMgr.doc    2	
X patches01                  1	
X source/player.c            2	
X source/tables.c            1	
X source/variable.c          3	
X util/printit               1	
X util/printit/Makefile      3	
X util/printit/pr_items.c    3	
X util/printit/pr_monst.c    3	
END_OF_FILE
if test 610 -ne `wc -c <'MANIFEST.P1'`; then
    echo shar: \"'MANIFEST.P1'\" unpacked with wrong size!
fi
# end of 'MANIFEST.P1'
fi
if test -f 'patches01' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'patches01'\"
else
echo shar: Extracting \"'patches01'\" \(39060 characters\)
sed "s/^X//" >'patches01' <<'END_OF_FILE'
Xdiff -cr oldumoria/CHANGES umoria/CHANGES
X*** oldumoria/CHANGES	Thu May 10 11:49:31 1990
X--- umoria/CHANGES	Sun May 27 15:38:31 1990
X***************
X*** 602,604
X  resource.hqx: recompiled the mac resource files
X  macscore.c, mac.c: changed control characters '...' to \311
X  all: distribute version 5.2.0
X
X--- 602,656 -----
X  resource.hqx: recompiled the mac resource files
X  macscore.c, mac.c: changed control characters '...' to \311
X  all: distribute version 5.2.0
X+ ----------- 5/14
X+ death.c, externs.h, io.c, ms_misc.c: Turbo C changes, void sleep() instead
X+ 	of unsigned sleep(), don't call reset_term() before exiting, ifdef
X+ 	out definition of sleep() in ms_misc.c, declare signal handler as
X+ 	void not int
X+ generate.c, types.h: change IBMPC_TURBO_C defines to the proper TURBOC define
X+ io.c: shell_out(), MSDOS code parameter to inkey() call deleted
X+ externs.h: count_msg_print() changed from (int) to (char *)
X+ io.c: get_check(), add code to use 'y' if LINT_ARGS defined, pause_exit()
X+ 	add code to use 'delay' for MSDOS machines
X+ ms_misc.c: clear_screen(0,0) changed to clear_screen()
X+ main.c: set stack size for TURBOC by declaring the _stksize variable
X+ misc2.c: player_saves(), split expression up because MPW C couldn't handle it
X+ save.c: include time.h for for the Mac, delete var 'i' in save_char (unused),
X+ 	get_char() add code for MAC to return FALSE if savefile doesn't exist
X+ mac.c: add call to initsavedefaults() in main()
X+ mac/ERRORS: document problem with mac Makefile
X+ -------- 5/15
X+ externs.h: remove decl of py_bash(), which is in moria2.c and static
X+ --------- 5/17
X+ dungeon.c: move search_off() call after check_view(), as panel_* variables
X+ 	must be valid before search_off() is called
X+ -------- 5/18
X+ all: 7 files did not end with newlines, 5 hqx files, and origcmds.hlp,
X+ 	misc/README also did not end with a newline
X+ -------- 5/21
X+ constant.h, version.hlp, moria.r: change version number to 5.2.1
X+ ScrnMgr.doc: split all lines greater than 80 characters, to make the file
X+ 	more portable
X+ --------- 5/22
X+ death.c: in mac sources, there was a 'true' instead of a 'TRUE'
X+ ms_misc.c: Turbo C sscanf() incorrectly reads a newline from a blank line,
X+ 	add check for newline to code that reads configuration file
X+ spells.c: door_creation(), called popt() before calling delete_object()
X+ 	which could then invalidate the value returned by popt, moved
X+ 	popt() call after the delete_object() call
X+ ----------- 5/25
X+ creature.c: fix the invincible/invisible monster bug, multiply_monster()
X+ 	was creating children on top of the parent, thus killing the parent
X+ 	for carnivorous monsters
X+ death.c, externs.h, generate.c, io.c, main.c, ms_misc.c, signals.c, types.h:
X+ 	change all TURBOC defines to __TURBOC__
X+ util/printit: new version of the printit program by Carl Hommel, fixed up
X+ 	to be somewhat more portable and to use only moria defined constants 
X+ -------- 5/27
X+ player.c, tables.c, variable.c: Turbo C can not accept any file with more than
X+ 	64K global variables, so variable.c split into three parts, also
X+ 	updated all makefiles to refer to all three files
X+ mac files: all three mac Makefiles modified to delete obsolete references to
X+ 	CInterface.o and CRuntime.o, scrnmgr Makefile modified to automatically
X+ 	combine the two ScrnMgr.c parts, README updated to document a problem
X+ 	with the Makefile not appending resources and text files sometimes
Xdiff -cr oldumoria/ERRORS umoria/ERRORS
X*** oldumoria/ERRORS	Thu May 10 11:37:10 1990
X--- umoria/ERRORS	Sun May 27 15:38:29 1990
X***************
X*** 1,3
X  for Atari ST, find and fix rest of the &/| long constant problems, esp. see
X  moria1.c
X  
X
X--- 1,23 -----
X+ on some unknown version of Sun OS, with some unknown compiler version,
X+ on a Sun 3/80, umoria core dumps while restoring a savefile if compiled
X+ with -O2, works if compiled with -O1
X+ 
X+ mac version does not clear screen properly when running a second
X+ character, try looking for variables which should be cleared but aren't,
X+ especially the race display, and object pointers
X+ 
X+ typing escape to the wizard mode change character prompts does not
X+ clear the message line
X+ 
X+ can actually get the 'internal error in identify scroll' message, user had
X+ two(one?) unidentified identify scrolls, and one known identify scroll,
X+ read the known one, identified the unknown ones, got the combining message,
X+ and then got the internal error message
X+ 
X+ need to clear the heavy_weapon state everytime a new weapon is wielded,
X+ so that you don't get 'can wield' message when going from heavy to light,
X+ but you do get a 'can't' wield' message when going from heavy to heavy
X+ 
X  for Atari ST, find and fix rest of the &/| long constant problems, esp. see
X  moria1.c
X  
X***************
X*** 13,22
X  I did this, note the def of errno in files.c for MSDOS
X  
X  clock in misc1.c needs to be changed, Mac (TC?) defines this
X- 
X- i believe it is possible for two oozes to eat each other, and this
X- will cause problems; there definitely IS a bug in the m_list code
X- somewhere
X  
X  a few routines still equate '\0' with ESCAPE, such as get_com(),
X  fix them to ignore NULL characters?,  also get_com() should echo "escape"
X
X--- 33,38 -----
X  I did this, note the def of errno in files.c for MSDOS
X  
X  clock in misc1.c needs to be changed, Mac (TC?) defines this
X  
X  a few routines still equate '\0' with ESCAPE, such as get_com(),
X  fix them to ignore NULL characters?,  also get_com() should echo "escape"
Xdiff -cr oldumoria/README umoria/README
X*** oldumoria/README	Wed May  9 16:05:57 1990
X--- umoria/README	Mon May 21 00:41:02 1990
X***************
X*** 3,9
X  second major release of the game.  These sources have been compiled
X  successfully at least once in the following environments: UNIX (4.2 BSD,
X  4.3 BSD, SYS V, Xenix, and many similar systems), IBM-PC (MSC 5.0,
X! Turbo C 4.0), Mac (MPW 3.0), Atari ST (MWC, GCC).  VMS and Mac (Think C 4.0)
X  ports are in progress.
X  
X  I consider these to be beta sources.  That means they will probably work
X
X--- 3,9 -----
X  second major release of the game.  These sources have been compiled
X  successfully at least once in the following environments: UNIX (4.2 BSD,
X  4.3 BSD, SYS V, Xenix, and many similar systems), IBM-PC (MSC 5.0,
X! Turbo C 2.0), Mac (MPW 3.0), Atari ST (MWC, GCC).  VMS and Mac (Think C 4.0)
X  ports are in progress.
X  
X  I consider these to be beta sources.  That means they will probably work
Xdiff -cr oldumoria/atari_st/Makefile umoria/atari_st/Makefile
X*** oldumoria/atari_st/Makefile	Mon Feb 26 21:27:46 1990
X--- umoria/atari_st/Makefile	Sun May 27 15:48:08 1990
X***************
X*** 12,18
X  	generate.c sets.c dungeon.c creature.c death.c eat.c help.c magic.c\
X  	potions.c prayer.c save.c staffs.c wands.c scrolls.c spells.c\
X  	wizard.c store2.c signals.c moria1.c moria2.c monsters.c\
X! 	treasure.c variable.c rnd.c recall.c atarist.c undef.c
X  
X  OBJS = main.o misc1.o misc2.o store1.o files.o io.o create.o desc.o\
X  	generate.o sets.o dungeon.o creature.o death.o eat.o help.o magic.o\
X
X--- 12,19 -----
X  	generate.c sets.c dungeon.c creature.c death.c eat.c help.c magic.c\
X  	potions.c prayer.c save.c staffs.c wands.c scrolls.c spells.c\
X  	wizard.c store2.c signals.c moria1.c moria2.c monsters.c\
X! 	treasure.c variable.c rnd.c recall.c atarist.c undef.c\
X! 	player.c tables.c
X  
X  OBJS = main.o misc1.o misc2.o store1.o files.o io.o create.o desc.o\
X  	generate.o sets.o dungeon.o creature.o death.o eat.o help.o magic.o\
X***************
X*** 18,24
X  	generate.o sets.o dungeon.o creature.o death.o eat.o help.o magic.o\
X  	potions.o prayer.o save.o staffs.o wands.o scrolls.o spells.o\
X  	wizard.o store2.o signals.o moria1.o moria2.o monsters.o\
X! 	treasure.o variable.o rnd.o recall.o atarist.o undef.o curses.o
X  
X  LIBFILES = moria_hours moria_help moria_orig_help moria_wiz_help \
X  	moria_orig_wiz_help moria_man
X
X--- 19,26 -----
X  	generate.o sets.o dungeon.o creature.o death.o eat.o help.o magic.o\
X  	potions.o prayer.o save.o staffs.o wands.o scrolls.o spells.o\
X  	wizard.o store2.o signals.o moria1.o moria2.o monsters.o\
X! 	treasure.o variable.o rnd.o recall.o atarist.o undef.o curses.o\
X! 	player.o tables.o
X  
X  LIBFILES = moria_hours moria_help moria_orig_help moria_wiz_help \
X  	moria_orig_wiz_help moria_man
X***************
X*** 84,89
X  monsters.o: constant.h types.h config.h
X  moria1.o: constant.h types.h externs.h config.h
X  moria2.o: constant.h types.h externs.h config.h
X  potions.o: constant.h types.h externs.h config.h
X  prayer.o: constant.h types.h externs.h config.h
X  recall.o: constant.h config.h types.h externs.h
X
X--- 86,92 -----
X  monsters.o: constant.h types.h config.h
X  moria1.o: constant.h types.h externs.h config.h
X  moria2.o: constant.h types.h externs.h config.h
X+ player.o: constant.h types.h config.h
X  potions.o: constant.h types.h externs.h config.h
X  prayer.o: constant.h types.h externs.h config.h
X  recall.o: constant.h config.h types.h externs.h
X***************
X*** 96,101
X  staffs.o: constant.h types.h externs.h config.h
X  store1.o: constant.h types.h externs.h config.h
X  store2.o: constant.h types.h externs.h config.h
X  treasure.o: constant.h types.h config.h
X  atarist.o: constant.h config.h types.h externs.h
X  variable.o: constant.h types.h config.h
X
X--- 99,105 -----
X  staffs.o: constant.h types.h externs.h config.h
X  store1.o: constant.h types.h externs.h config.h
X  store2.o: constant.h types.h externs.h config.h
X+ tables.o: constant.h types.h config.h
X  treasure.o: constant.h types.h config.h
X  atarist.o: constant.h config.h types.h externs.h
X  variable.o: constant.h types.h config.h
Xdiff -cr oldumoria/files/version.hlp umoria/files/version.hlp
X*** oldumoria/files/version.hlp	Wed May  9 15:11:55 1990
X--- umoria/files/version.hlp	Mon May 21 16:53:08 1990
X***************
X*** 52,55
X    not for profit purposes provided that this copyright and statement are
X    included in all such copies.
X  
X! Umoria Version 5.2, patch level 0
X
X--- 52,55 -----
X    not for profit purposes provided that this copyright and statement are
X    included in all such copies.
X  
X! Umoria Version 5.2, patch level 1
Xdiff -cr oldumoria/ibmpc/MLINK.LNK umoria/ibmpc/MLINK.LNK
X*** oldumoria/ibmpc/MLINK.LNK	Fri May  4 16:50:21 1990
X--- umoria/ibmpc/MLINK.LNK	Sun May 27 15:43:37 1990
X***************
X*** 4,7
X  POTIONS+PRAYER+RND+SAVE+
X  SCROLLS+SETS+SIGNALS+SPELLS+STAFFS+
X  STORE1+STORE2+TREASURE+VARIABLE+
X! WANDS+WIZARD+IO+MS_MISC+UNDEF+RECALL,moria,,pccurses
X
X--- 4,8 -----
X  POTIONS+PRAYER+RND+SAVE+
X  SCROLLS+SETS+SIGNALS+SPELLS+STAFFS+
X  STORE1+STORE2+TREASURE+VARIABLE+
X! WANDS+WIZARD+IO+MS_MISC+UNDEF+RECALL+
X! PLAYER.C+TABLES.C,moria,,pccurses
Xdiff -cr oldumoria/ibmpc/MORIA.CNF umoria/ibmpc/MORIA.CNF
X*** oldumoria/ibmpc/MORIA.CNF	Fri May  4 16:50:07 1990
X--- umoria/ibmpc/MORIA.CNF	Mon May 14 13:54:08 1990
X***************
X*** 1,4
X! # Configuration file for PC MORIA 4.87
X  #
X  # All lines that have the # character as the first character are
X  # comment lines.  Blank lines are totally ignored.
X
X--- 1,4 -----
X! # Configuration file for PC MORIA 5.x
X  #
X  # All lines that have the # character as the first character are
X  # comment lines.  Blank lines are totally ignored.
Xdiff -cr oldumoria/ibmpc/ms_misc.c umoria/ibmpc/ms_misc.c
X*** oldumoria/ibmpc/ms_misc.c	Tue Mar 27 14:27:05 1990
X--- umoria/ibmpc/ms_misc.c	Fri May 25 17:14:13 1990
X***************
X*** 57,62
X  	return cp;
X  }
X  
X  unsigned int
X  sleep(secs)
X  int	secs;
X
X--- 57,63 -----
X  	return cp;
X  }
X  
X+ #ifndef __TURBOC__
X  unsigned int
X  sleep(secs)
X  int	secs;
X***************
X*** 68,73
X  		/* nothing */;
X  	return 0;
X  }
X  
X  void
X  error(fmt, a1, a2, a3, a4)
X
X--- 69,75 -----
X  		/* nothing */;
X  	return 0;
X  }
X+ #endif
X  
X  void
X  error(fmt, a1, a2, a3, a4)
X***************
X*** 153,159
X  			continue;
X  
X  		cnt = sscanf(buf, "%s", opt);
X! 		if (cnt == 0 || opt[0] == '\0')
X  			continue;
X  
X  		/* Go through possible variables
X
X--- 155,163 -----
X  			continue;
X  
X  		cnt = sscanf(buf, "%s", opt);
X! 		/* Turbo C will incorrectly read a newline from an empty line,
X! 		   MSC will read correctly read a NULL character */
X! 		if (cnt == 0 || opt[0] == '\0' || opt[0] == '\n')
X  			continue;
X  
X  		/* Go through possible variables
X***************
X*** 382,388
X  {
X          char buf[80];
X  
X! 	clear_screen(0, 0);
X          wmove(stdscr,0,0); 
X  	waddstr(stdscr,"                         *********************");
X  	wmove(stdscr,1,0);
X
X--- 386,392 -----
X  {
X          char buf[80];
X  
X! 	clear_screen();
X          wmove(stdscr,0,0); 
X  	waddstr(stdscr,"                         *********************");
X  	wmove(stdscr,1,0);
Xdiff -cr oldumoria/mac/README umoria/mac/README
X*** oldumoria/mac/README	Sun Mar  4 03:38:31 1990
X--- umoria/mac/README	Sun May 27 15:32:40 1990
X***************
X*** 28,30
X  
X  	a.	Set the directory to "{NewDir}"
X  	b.	Build (cmd-B) "Moria" (or execute "BuildProgram Moria").
X
X--- 28,34 -----
X  
X  	a.	Set the directory to "{NewDir}"
X  	b.	Build (cmd-B) "Moria" (or execute "BuildProgram Moria").
X+ 	c.  If Moria doesn't seem to work right, it is probably because
X+ 		the resource and text files weren't appended to the application.
X+ 		Either delete the file Moria and rebuild, or else execute by hand
X+ 		the commands which append the resources and text files.
Xdiff -cr oldumoria/mac/mac.c umoria/mac/mac.c
X*** oldumoria/mac/mac.c	Thu May 10 11:42:44 1990
X--- umoria/mac/mac.c	Mon May 14 19:11:52 1990
X***************
X*** 1674,1679
X  	
X  	restart_flag = FALSE;
X  	
X  	/* Find out if user has started from a saved game */
X  	savedgame = getfinderfile();
X  	
X
X--- 1674,1681 -----
X  	
X  	restart_flag = FALSE;
X  	
X+ 	initsavedefaults ();
X+ 
X  	/* Find out if user has started from a saved game */
X  	savedgame = getfinderfile();
X  	
Xdiff -cr oldumoria/mac/macdata.c umoria/mac/macdata.c
X*** oldumoria/mac/macdata.c	Sun Mar  4 03:38:35 1990
X--- umoria/mac/macdata.c	Sun May 27 15:19:27 1990
X***************
X*** 1,7
X  /* This program creates the initialized global data resources.		*/
X  /* It is compiled as an MPW tool.									*/
X  
X! /* Monsters.c, treasur1.c, treasur2.c, variable.c are included.		*/
X  /* But, when this program is built, the compiler is instructed to	*/
X  /* actually include the initialized global data.  We just copy it	*/
X  /* into resource handles and dump them to the executable.			*/
X
X--- 1,7 -----
X  /* This program creates the initialized global data resources.		*/
X  /* It is compiled as an MPW tool.									*/
X  
X! /* Monsters.c, player.c, tables.c, treasure.c, and variables.c are included.*/
X  /* But, when this program is built, the compiler is instructed to	*/
X  /* actually include the initialized global data.  We just copy it	*/
X  /* into resource handles and dump them to the executable.			*/
Xdiff -cr oldumoria/mac/moria.r umoria/mac/moria.r
X*** oldumoria/mac/moria.r	Wed May  9 15:14:30 1990
X--- umoria/mac/moria.r	Mon May 21 16:54:25 1990
X***************
X*** 13,19
X  };
X  
X  resource 'MRIA' (0) {
X! 	"Moria 5.2.0 for the Macintosh: Implementation 2.0b1"
X  };
X  
X  resource 'BNDL' (128, purgeable) {
X
X--- 13,19 -----
X  };
X  
X  resource 'MRIA' (0) {
X! 	"Moria 5.2.1 for the Macintosh: Implementation 2.0b1"
X  };
X  
X  resource 'BNDL' (128, purgeable) {
X***************
X*** 205,211
X  		StaticText {
X  			disabled,
X  			"Moria for the Macintosh\n"
X! 			"Version 5.2.0\n"
X  			"Implementation 2.0b1\n\n\n"
X  			"Programmers:\n"
X  			"Robert Alan Koeneke\n"
X
X--- 205,211 -----
X  		StaticText {
X  			disabled,
X  			"Moria for the Macintosh\n"
X! 			"Version 5.2.1\n"
X  			"Implementation 2.0b1\n\n\n"
X  			"Programmers:\n"
X  			"Robert Alan Koeneke\n"
X***************
X*** 560,566
X  		{8, 52, 40, 380},
X  		StaticText {
X  			disabled,
X! 			"Moria for the Macintosh Version 5.2.0"
X  		},
X  		/* [6] */
X  		{8, 8, 40, 40},
X
X--- 560,566 -----
X  		{8, 52, 40, 380},
X  		StaticText {
X  			disabled,
X! 			"Moria for the Macintosh Version 5.2.1"
X  		},
X  		/* [6] */
X  		{8, 8, 40, 40},
X***************
X*** 584,590
X  
X  resource 'TEXT' (512, "Mac Help", purgeable) {
X  	"This is an beta version of Mac Moria, implementation 2.0b1, which is "
X! 	"based on the Umoria 5.2.0 sources.  Please send comments and bug repor"
X  	"ts to wilson@ernie.Berkeley.EDU (Jim Wilson) or 73230.224@compuserve.c"
X  	"om (Curtis McCauley).\n\n"
X  	"Users of previous versions o"
X
X--- 584,590 -----
X  
X  resource 'TEXT' (512, "Mac Help", purgeable) {
X  	"This is an beta version of Mac Moria, implementation 2.0b1, which is "
X! 	"based on the Umoria 5.2.1 sources.  Please send comments and bug repor"
X  	"ts to wilson@ernie.Berkeley.EDU (Jim Wilson) or 73230.224@compuserve.c"
X  	"om (Curtis McCauley).\n\n"
X  	"Users of previous versions o"
Xdiff -cr oldumoria/source/constant.h umoria/source/constant.h
X*** oldumoria/source/constant.h	Wed May  9 15:09:55 1990
X--- umoria/source/constant.h	Mon May 21 16:52:42 1990
X***************
X*** 24,30
X  /* Current version number of Moria				*/
X  #define CUR_VERSION_MAJ 5 /* version 5.2 */
X  #define CUR_VERSION_MIN 2
X! #define PATCH_LEVEL 0
X  
X  #ifndef TRUE
X  #define TRUE 1
X
X--- 24,30 -----
X  /* Current version number of Moria				*/
X  #define CUR_VERSION_MAJ 5 /* version 5.2 */
X  #define CUR_VERSION_MIN 2
X! #define PATCH_LEVEL 1
X  
X  #ifndef TRUE
X  #define TRUE 1
Xdiff -cr oldumoria/source/creature.c umoria/source/creature.c
X*** oldumoria/source/creature.c	Fri May  4 19:33:39 1990
X--- umoria/source/creature.c	Fri May 25 17:07:25 1990
X***************
X*** 905,911
X  	attackn++;
X        else
X  	break;
X!    }
X  }
X  
X  
X
X--- 905,911 -----
X  	attackn++;
X        else
X  	break;
X!     }
X  }
X  
X  
X***************
X*** 1389,1395
X      {
X        j = y - 2 + randint(3);
X        k = x - 2 + randint(3);
X!       if (in_bounds(j, k))
X  	{
X  	  c_ptr = &cave[j][k];
X  	  if ((c_ptr->fval <= MAX_OPEN_SPACE) && (c_ptr->tptr == 0) &&
X
X--- 1389,1397 -----
X      {
X        j = y - 2 + randint(3);
X        k = x - 2 + randint(3);
X!       /* don't create a new creature on top of the old one, that causes
X! 	 invincible/invisible creatures to appear */
X!       if (in_bounds(j, k) && (j != y || k != x))
X  	{
X  	  c_ptr = &cave[j][k];
X  	  if ((c_ptr->fval <= MAX_OPEN_SPACE) && (c_ptr->tptr == 0) &&
Xdiff -cr oldumoria/source/death.c umoria/source/death.c
X*** oldumoria/source/death.c	Fri May  4 18:19:28 1990
X--- umoria/source/death.c	Fri May 25 17:10:53 1990
X***************
X*** 257,263
X  	  break;
X  	case 'y': case 'Y':
X  	  func = 'Y';
X! 	  ok = true;
X  	  break;
X  	case 'n': case 'N':
X  	  func = 'N';
X
X--- 257,263 -----
X  	  break;
X  	case 'y': case 'Y':
X  	  func = 'Y';
X! 	  ok = TRUE;
X  	  break;
X  	case 'n': case 'N':
X  	  func = 'N';
X***************
X*** 549,554
X    if (i > 0)
X      display_scores (i, TRUE);
X    erase_line (23, 0);
X    restore_term ();
X  #ifdef MAC
X    /* Undo what has been done */
X
X--- 549,555 -----
X    if (i > 0)
X      display_scores (i, TRUE);
X    erase_line (23, 0);
X+ #ifndef __TURBOC__
X    restore_term ();
X  #endif
X  #ifdef MAC
X***************
X*** 550,555
X      display_scores (i, TRUE);
X    erase_line (23, 0);
X    restore_term ();
X  #ifdef MAC
X    /* Undo what has been done */
X    enablefilemenu(TRUE);
X
X--- 551,557 -----
X    erase_line (23, 0);
X  #ifndef __TURBOC__
X    restore_term ();
X+ #endif
X  #ifdef MAC
X    /* Undo what has been done */
X    enablefilemenu(TRUE);
Xdiff -cr oldumoria/source/dungeon.c umoria/source/dungeon.c
X*** oldumoria/source/dungeon.c	Mon May  7 23:56:50 1990
X--- umoria/source/dungeon.c	Thu May 17 14:31:30 1990
X***************
X*** 82,89
X    find_count = 0;
X    new_level_flag    = FALSE;
X    find_flag	= FALSE;
X-   if (search_flag)
X-     search_off();
X    teleport_flag = FALSE;
X    mon_tot_mult	= 0;
X    cave[char_row][char_col].cptr = 1;
X
X--- 82,87 -----
X    find_count = 0;
X    new_level_flag    = FALSE;
X    find_flag	= FALSE;
X    teleport_flag = FALSE;
X    mon_tot_mult	= 0;
X    cave[char_row][char_col].cptr = 1;
X***************
X*** 91,96
X    panel_row = panel_col = -1;
X    /* Light up the area around character	   */
X    check_view ();
X    /* Light,  but do not move critters	    */
X    creatures(FALSE);
X    /* Print the depth			   */
X
X--- 89,99 -----
X    panel_row = panel_col = -1;
X    /* Light up the area around character	   */
X    check_view ();
X+   /* must do this after panel_row/col set to -1, because search_off() will call
X+      check_view(), and so the panel_* variables must be valid before
X+      search_off() is called */
X+   if (search_flag)
X+     search_off();
X    /* Light,  but do not move critters	    */
X    creatures(FALSE);
X    /* Print the depth			   */
Xdiff -cr oldumoria/source/externs.h umoria/source/externs.h
X*** oldumoria/source/externs.h	Fri May  4 20:49:41 1990
X--- umoria/source/externs.h	Fri May 25 17:11:07 1990
X***************
X*** 297,303
X  void clear_from(int);
X  void print(char, int, int);
X  void move_cursor_relative(int, int);
X! void count_msg_print(int);
X  void prt(char *, int, int);
X  void move_cursor(int, int);
X  void msg_print(char *);
X
X--- 297,303 -----
X  void clear_from(int);
X  void print(char, int, int);
X  void move_cursor_relative(int, int);
X! void count_msg_print(char *);
X  void prt(char *, int, int);
X  void move_cursor(int, int);
X  void msg_print(char *);
X***************
X*** 494,500
X  void look(void);
X  void throw_object(void);
X  void bash(void);
X- void py_bash(int, int);
X  
X  #ifdef MSDOS
X  /* ms_misc.c */
X
X--- 494,499 -----
X  void look(void);
X  void throw_object(void);
X  void bash(void);
X  
X  #ifdef MSDOS
X  /* ms_misc.c */
X***************
X*** 499,504
X  #ifdef MSDOS
X  /* ms_misc.c */
X  char *getlogin(void);
X  unsigned int sleep(int );
X  void error(char *, ...);
X  void warn(char *, ...);
X
X--- 498,506 -----
X  #ifdef MSDOS
X  /* ms_misc.c */
X  char *getlogin(void);
X+ #ifdef __TURBOC__
X+ void sleep(int);
X+ #else
X  unsigned int sleep(int );
X  #endif
X  void error(char *, ...);
X***************
X*** 500,505
X  /* ms_misc.c */
X  char *getlogin(void);
X  unsigned int sleep(int );
X  void error(char *, ...);
X  void warn(char *, ...);
X  void msdos_init(void);
X
X--- 502,508 -----
X  void sleep(int);
X  #else
X  unsigned int sleep(int );
X+ #endif
X  void error(char *, ...);
X  void warn(char *, ...);
X  void msdos_init(void);
X***************
X*** 952,958
X  void look();
X  void throw_object();
X  void bash();
X- void py_bash();
X  
X  #ifdef MSDOS
X  /* ms_misc.c */
X
X--- 955,960 -----
X  void look();
X  void throw_object();
X  void bash();
X  
X  #ifdef MSDOS
X  /* ms_misc.c */
X***************
X*** 957,962
X  #ifdef MSDOS
X  /* ms_misc.c */
X  char *getlogin();
X  unsigned int sleep();
X  void error();
X  void warn();
X
X--- 959,967 -----
X  #ifdef MSDOS
X  /* ms_misc.c */
X  char *getlogin();
X+ #ifdef __TURBOC__
X+ void sleep();
X+ #else
X  unsigned int sleep();
X  #endif
X  void error();
X***************
X*** 958,963
X  /* ms_misc.c */
X  char *getlogin();
X  unsigned int sleep();
X  void error();
X  void warn();
X  void msdos_init();
X
X--- 963,969 -----
X  void sleep();
X  #else
X  unsigned int sleep();
X+ #endif
X  void error();
X  void warn();
X  void msdos_init();
Xdiff -cr oldumoria/source/generate.c umoria/source/generate.c
X*** oldumoria/source/generate.c	Fri May  4 19:00:51 1990
X--- umoria/source/generate.c	Fri May 25 17:11:17 1990
X***************
X*** 13,19
X  
X  #ifdef USG
X  #if !defined(ATARIST_MWC)
X! #ifndef IBMPC_TURBO_C
X  #include <memory.h>
X  #else
X  #include <mem.h>
X
X--- 13,19 -----
X  
X  #ifdef USG
X  #if !defined(ATARIST_MWC)
X! #ifndef __TURBOC__
X  #include <memory.h>
X  #else
X  #include <mem.h>
Xdiff -cr oldumoria/source/io.c umoria/source/io.c
X*** oldumoria/source/io.c	Fri May  4 18:41:55 1990
X--- umoria/source/io.c	Fri May 25 17:11:29 1990
X***************
X*** 136,141
X  
X  #ifdef USG
X  void exit();
X  unsigned sleep();
X  #endif
X  #ifdef ultrix
X
X--- 136,144 -----
X  
X  #ifdef USG
X  void exit();
X+ #ifdef __TURBOC__
X+ void sleep();
X+ #else
X  unsigned sleep();
X  #endif
X  #endif
X***************
X*** 138,143
X  void exit();
X  unsigned sleep();
X  #endif
X  #ifdef ultrix
X  void exit();
X  void sleep();
X
X--- 141,147 -----
X  #else
X  unsigned sleep();
X  #endif
X+ #endif
X  #ifdef ultrix
X  void exit();
X  void sleep();
X***************
X*** 535,541
X  	clear_screen();	/* BOSS key if shell failed */
X  	put_buffer("M:\\> ", 0, 0);
X  	do {
X! 	  key = inkey(key);
X  	} while (key != '!');
X    }
X  
X
X--- 539,545 -----
X  	clear_screen();	/* BOSS key if shell failed */
X  	put_buffer("M:\\> ", 0, 0);
X  	do {
X! 	  key = inkey();
X  	} while (key != '!');
X    }
X  
X***************
X*** 1055,1060
X    /* prevent message 'warning: y is unused' */
X    x = y;
X  #endif
X  #endif
X  
X    if (x > 73)
X
X--- 1059,1067 -----
X    /* prevent message 'warning: y is unused' */
X    x = y;
X  #endif
X+ #ifdef LINT_ARGS
X+   /* prevent message about y never used for MSDOS systems */
X+   res = y;
X  #endif
X  #endif
X  
X***************
X*** 1056,1061
X    x = y;
X  #endif
X  #endif
X  
X    if (x > 73)
X  #ifdef ATARIST_MWC
X
X--- 1063,1069 -----
X    /* prevent message about y never used for MSDOS systems */
X    res = y;
X  #endif
X+ #endif
X  
X    if (x > 73)
X  #ifdef ATARIST_MWC
X***************
X*** 1230,1235
X        erase_line(prt_line, 0);
X  #ifndef MSDOS		/* PCs are slow enough as is  -dgk */
X        if (delay > 0)  (void) sleep((unsigned)delay);
X  #endif
X  #ifdef MAC
X        enablefilemenu(FALSE);
X
X--- 1238,1246 -----
X        erase_line(prt_line, 0);
X  #ifndef MSDOS		/* PCs are slow enough as is  -dgk */
X        if (delay > 0)  (void) sleep((unsigned)delay);
X+ #else
X+       /* prevent message about delay unused */
X+       dummy = delay;
X  #endif
X  #ifdef MAC
X        enablefilemenu(FALSE);
Xdiff -cr oldumoria/source/main.c umoria/source/main.c
X*** oldumoria/source/main.c	Fri May  4 20:48:51 1990
X--- umoria/source/main.c	Fri May 25 17:11:37 1990
X***************
X*** 121,126
X  long _stksize = 18000;		/*(SAJ) for MWC	*/
X  #endif
X  
X  #if defined(LINT_ARGS)
X  static void char_inven_init(void);
X  static void init_m_level(void);
X
X--- 121,130 -----
X  long _stksize = 18000;		/*(SAJ) for MWC	*/
X  #endif
X  
X+ #ifdef __TURBOC__
X+ unsigned _stklen = 0x3fff;	/* increase stack from 4K to 16K */
X+ #endif
X+ 
X  #if defined(LINT_ARGS)
X  static void char_inven_init(void);
X  static void init_m_level(void);
Xdiff -cr oldumoria/source/misc2.c umoria/source/misc2.c
X*** oldumoria/source/misc2.c	Tue May  8 13:07:13 1990
X--- umoria/source/misc2.c	Wed May 16 15:34:45 1990
X***************
X*** 2308,2313
X  /* Saving throws for player character.		-RAK-	*/
X  int player_saves()
X  {
X    if (randint(100) <= (py.misc.save + stat_adj(A_WIS)
X  		       + (class_level_adj[py.misc.pclass][CLA_SAVE]
X  			  * py.misc.lev / 3)))
X
X--- 2308,2316 -----
X  /* Saving throws for player character.		-RAK-	*/
X  int player_saves()
X  {
X+   /* MPW C couldn't handle the expression, so split it into two parts */
X+   int16 temp = class_level_adj[py.misc.pclass][CLA_SAVE];
X+ 
X    if (randint(100) <= (py.misc.save + stat_adj(A_WIS)
X  		       + (temp * py.misc.lev / 3)))
X      return(TRUE);
X***************
X*** 2309,2316
X  int player_saves()
X  {
X    if (randint(100) <= (py.misc.save + stat_adj(A_WIS)
X! 		       + (class_level_adj[py.misc.pclass][CLA_SAVE]
X! 			  * py.misc.lev / 3)))
X      return(TRUE);
X    else
X      return(FALSE);
X
X--- 2312,2318 -----
X    int16 temp = class_level_adj[py.misc.pclass][CLA_SAVE];
X  
X    if (randint(100) <= (py.misc.save + stat_adj(A_WIS)
X! 		       + (temp * py.misc.lev / 3)))
X      return(TRUE);
X    else
X      return(FALSE);
Xdiff -cr oldumoria/source/save.c umoria/source/save.c
X*** oldumoria/source/save.c	Thu May 10 10:16:18 1990
X--- umoria/source/save.c	Mon May 14 19:08:52 1990
X***************
X*** 70,75
X  #endif
X  
X  #if !defined(ATARIST_MWC)
X  long time();
X  #else
X  char *malloc();
X
X--- 70,78 -----
X  #endif
X  
X  #if !defined(ATARIST_MWC)
X+ #ifdef MAC
X+ #include <time.h>
X+ #else
X  long time();
X  #endif
X  #else
X***************
X*** 71,76
X  
X  #if !defined(ATARIST_MWC)
X  long time();
X  #else
X  char *malloc();
X  #endif
X
X--- 74,80 -----
X  #include <time.h>
X  #else
X  long time();
X+ #endif
X  #else
X  char *malloc();
X  #endif
X***************
X*** 491,497
X  char *fnam;
X  {
X    vtype temp;
X!   register int i, ok, fd;
X    int8u char_tmp;
X  
X    if (log_index < 0)
X
X--- 495,501 -----
X  char *fnam;
X  {
X    vtype temp;
X!   register int ok, fd;
X    int8u char_tmp;
X  
X    if (log_index < 0)
X***************
X*** 641,646
X        msg_print("Savefile does not exist.");
X        return FALSE;	/* Don't bother with messages here. File absent. */
X      }
X  #endif
X  
X    clear_screen();
X
X--- 645,653 -----
X        msg_print("Savefile does not exist.");
X        return FALSE;	/* Don't bother with messages here. File absent. */
X      }
X+ #else
X+   if (access (savefile, 0) < 0)
X+     return FALSE;
X  #endif
X  
X    clear_screen();
Xdiff -cr oldumoria/source/signals.c umoria/source/signals.c
X*** oldumoria/source/signals.c	Fri May  4 18:17:16 1990
X--- umoria/source/signals.c	Fri May 25 17:11:52 1990
X***************
X*** 76,81
X  
X  #ifdef USG
X  void exit();
X  unsigned sleep();
X  #endif
X  
X
X--- 76,84 -----
X  
X  #ifdef USG
X  void exit();
X+ #ifdef __TURBOC__
X+ void sleep();
X+ #else
X  unsigned sleep();
X  #endif
X  #endif
X***************
X*** 78,83
X  void exit();
X  unsigned sleep();
X  #endif
X  
X  static int error_sig = -1;
X  static int signal_count = 0;
X
X--- 81,87 -----
X  #else
X  unsigned sleep();
X  #endif
X+ #endif
X  
X  static int error_sig = -1;
X  static int signal_count = 0;
X***************
X*** 92,97
X  
X    smask = sigsetmask(0) | (1 << sig);
X  #else
X  static int signal_handler(sig)
X  int sig;
X  {
X
X--- 96,104 -----
X  
X    smask = sigsetmask(0) | (1 << sig);
X  #else
X+ #ifdef __TURBOC__
X+ static void signal_handler(sig)
X+ #else
X  static int signal_handler(sig)
X  #endif
X  int sig;
X***************
X*** 93,98
X    smask = sigsetmask(0) | (1 << sig);
X  #else
X  static int signal_handler(sig)
X  int sig;
X  {
X  
X
X--- 100,106 -----
X  static void signal_handler(sig)
X  #else
X  static int signal_handler(sig)
X+ #endif
X  int sig;
X  {
X  
Xdiff -cr oldumoria/source/spells.c umoria/source/spells.c
X*** oldumoria/source/spells.c	Mon Apr  9 12:11:18 1990
X--- umoria/source/spells.c	Tue May 22 15:25:17 1990
X***************
X*** 437,443
X  	  if (c_ptr->fval <= MAX_CAVE_FLOOR)
X  	    {
X  	      door = TRUE;
X- 	      k = popt();
X  	      if (c_ptr->tptr != 0)
X  		(void) delete_object(i, j);
X  	      c_ptr->fval = BLOCKED_FLOOR;
X
X--- 437,442 -----
X  	  if (c_ptr->fval <= MAX_CAVE_FLOOR)
X  	    {
X  	      door = TRUE;
X  	      if (c_ptr->tptr != 0)
X  		(void) delete_object(i, j);
X  	      k = popt();
X***************
X*** 440,445
X  	      k = popt();
X  	      if (c_ptr->tptr != 0)
X  		(void) delete_object(i, j);
X  	      c_ptr->fval = BLOCKED_FLOOR;
X  	      c_ptr->tptr = k;
X  	     invcopy(&t_list[k], OBJ_CLOSED_DOOR);
X
X--- 439,445 -----
X  	      door = TRUE;
X  	      if (c_ptr->tptr != 0)
X  		(void) delete_object(i, j);
X+ 	      k = popt();
X  	      c_ptr->fval = BLOCKED_FLOOR;
X  	      c_ptr->tptr = k;
X  	      invcopy(&t_list[k], OBJ_CLOSED_DOOR);
X***************
X*** 442,448
X  		(void) delete_object(i, j);
X  	      c_ptr->fval = BLOCKED_FLOOR;
X  	      c_ptr->tptr = k;
X! 	     invcopy(&t_list[k], OBJ_CLOSED_DOOR);
X  	      lite_spot(i, j);
X  	    }
X  	}
X
X--- 442,448 -----
X  	      k = popt();
X  	      c_ptr->fval = BLOCKED_FLOOR;
X  	      c_ptr->tptr = k;
X! 	      invcopy(&t_list[k], OBJ_CLOSED_DOOR);
X  	      lite_spot(i, j);
X  	    }
X  	}
Xdiff -cr oldumoria/source/treasure.c umoria/source/treasure.c
X*** oldumoria/source/treasure.c	Mon Apr 16 19:07:05 1990
X--- umoria/source/treasure.c	Fri May 25 20:43:52 1990
X***************
X*** 1,4
X! /* treasur1.c: dungeon object definitions
X  
X     Copyright (c) 1989 James E. Wilson, Robert A. Koeneke
X  
X
X--- 1,4 -----
X! /* treasure.c: dungeon object definitions
X  
X     Copyright (c) 1989 James E. Wilson, Robert A. Koeneke
X  
Xdiff -cr oldumoria/source/types.h umoria/source/types.h
X*** oldumoria/source/types.h	Fri May  4 18:18:13 1990
X--- umoria/source/types.h	Fri May 25 17:12:23 1990
X***************
X*** 318,324
X    unsigned int pl : 1;	/* permanent light, used for walls and lighted rooms */
X    unsigned int tl : 1;	/* temporary light, used for player's lamp light,etc.*/
X  #else
X! #ifndef IBMPC_TURBO_C
X    /* this is not legal ANSI C, this is a MSC extension, which will use 1 byte
X       for the bitfields whereas MSC uses 2 bytes for the bitfields above */
X    /* this is also a MWC extension on the Atari ST */
X
X--- 318,324 -----
X    unsigned int pl : 1;	/* permanent light, used for walls and lighted rooms */
X    unsigned int tl : 1;	/* temporary light, used for player's lamp light,etc.*/
X  #else
X! #ifndef __TURBOC__
X    /* this is not legal ANSI C, this is a MSC extension, which will use 1 byte
X       for the bitfields whereas MSC uses 2 bytes for the bitfields above */
X    /* this is also a MWC extension on the Atari ST */
Xdiff -cr oldumoria/unix/Makefile umoria/unix/Makefile
X*** oldumoria/unix/Makefile	Tue May  8 00:06:16 1990
X--- umoria/unix/Makefile	Sun May 27 15:59:20 1990
X***************
X*** 11,17
X  	generate.c sets.c dungeon.c creature.c death.c eat.c help.c magic.c\
X  	potions.c prayer.c save.c staffs.c wands.c scrolls.c spells.c\
X  	wizard.c store2.c signals.c moria1.c moria2.c monsters.c\
X! 	treasure.c variable.c rnd.c recall.c unix.c undef.c
X  
X  OBJS = main.o misc1.o misc2.o store1.o files.o io.o create.o desc.o\
X  	generate.o sets.o dungeon.o creature.o death.o eat.o help.o magic.o\
X
X--- 11,18 -----
X  	generate.c sets.c dungeon.c creature.c death.c eat.c help.c magic.c\
X  	potions.c prayer.c save.c staffs.c wands.c scrolls.c spells.c\
X  	wizard.c store2.c signals.c moria1.c moria2.c monsters.c\
X! 	treasure.c variable.c rnd.c recall.c unix.c undef.c\
X! 	player.c tables.c
X  
X  OBJS = main.o misc1.o misc2.o store1.o files.o io.o create.o desc.o\
X  	generate.o sets.o dungeon.o creature.o death.o eat.o help.o magic.o\
X***************
X*** 17,23
X  	generate.o sets.o dungeon.o creature.o death.o eat.o help.o magic.o\
X  	potions.o prayer.o save.o staffs.o wands.o scrolls.o spells.o\
X  	wizard.o store2.o signals.o moria1.o moria2.o monsters.o\
X! 	treasure.o variable.o rnd.o recall.o unix.o undef.o
X  
X  LIBFILES = hours news origcmds.hlp owizcmds.hlp roglcmds.hlp rwizcmds.hlp \
X  	scores version.hlp welcome.hlp
X
X--- 18,25 -----
X  	generate.o sets.o dungeon.o creature.o death.o eat.o help.o magic.o\
X  	potions.o prayer.o save.o staffs.o wands.o scrolls.o spells.o\
X  	wizard.o store2.o signals.o moria1.o moria2.o monsters.o\
X! 	treasure.o variable.o rnd.o recall.o unix.o undef.o\
X! 	player.o tables.o
X  
X  LIBFILES = hours news origcmds.hlp owizcmds.hlp roglcmds.hlp rwizcmds.hlp \
X  	scores version.hlp welcome.hlp
X***************
X*** 66,71
X  monsters.o: constant.h types.h config.h
X  moria1.o: constant.h types.h externs.h config.h
X  moria2.o: constant.h types.h externs.h config.h
X  potions.o: constant.h types.h externs.h config.h
X  prayer.o: constant.h types.h externs.h config.h
X  recall.o: constant.h config.h types.h externs.h
X
X--- 68,74 -----
X  monsters.o: constant.h types.h config.h
X  moria1.o: constant.h types.h externs.h config.h
X  moria2.o: constant.h types.h externs.h config.h
X+ player.o: constant.h types.h config.h
X  potions.o: constant.h types.h externs.h config.h
X  prayer.o: constant.h types.h externs.h config.h
X  recall.o: constant.h config.h types.h externs.h
X***************
X*** 78,83
X  staffs.o: constant.h types.h externs.h config.h
X  store1.o: constant.h types.h externs.h config.h
X  store2.o: constant.h types.h externs.h config.h
X  treasure.o: constant.h types.h config.h
X  unix.o: constant.h config.h types.h externs.h
X  variable.o: constant.h types.h config.h
X
X--- 81,87 -----
X  staffs.o: constant.h types.h externs.h config.h
X  store1.o: constant.h types.h externs.h config.h
X  store2.o: constant.h types.h externs.h config.h
X+ tables.o: constant.h types.h config.h
X  treasure.o: constant.h types.h config.h
X  unix.o: constant.h config.h types.h externs.h
X  variable.o: constant.h types.h config.h
Xdiff -cr oldumoria/util/README umoria/util/README
X*** oldumoria/util/README	Fri May  4 17:53:32 1990
X--- umoria/util/README	Fri May 25 21:47:04 1990
X***************
X*** 10,17
X  monster.cng: a list of some of the changes to the monster.c file, is this
X  still needed?
X  
X! printit.c: some code which would pretty print item/monster descriptions for
X! umoria 4.87, by Carl Hommel, obsolete
X  
X  showmon.c: obsolete code from 4.87 for printing the monster dictionary,
X  superceded by the monster memories
X
X--- 10,17 -----
X  monster.cng: a list of some of the changes to the monster.c file, is this
X  still needed?
X  
X! printit.c: some code which will pretty print item/monster descriptions,
X! written by Carl Hommel
X  
X  showmon.c: obsolete code from 4.87 for printing the monster dictionary,
X  superceded by the monster memories
X***************
X*** 16,19
X  showmon.c: obsolete code from 4.87 for printing the monster dictionary,
X  superceded by the monster memories
X  
X! weapons: a program which roughly indicates which weapons are best
X
X--- 16,21 -----
X  showmon.c: obsolete code from 4.87 for printing the monster dictionary,
X  superceded by the monster memories
X  
X! weapons: a program which roughly indicates which weapons are best, written
X! by Wayne Schlitt
X! 
Xdiff -cr oldumoria/vms/make.com umoria/vms/make.com
X*** oldumoria/vms/make.com	Wed Feb 14 13:05:52 1990
X--- umoria/vms/make.com	Sun May 27 15:46:50 1990
X***************
X*** 17,22
X  $ cc moria1.c /obj=moria1.o
X  $ cc moria2.c /obj=moria2.o
X  $ cc potions.c /obj=potions.o
X  $ cc prayer.c /obj=prayer.o
X  $ cc save.c /obj=save.o
X  $ cc scrolls.c /obj=scrolls.o
X
X--- 17,23 -----
X  $ cc moria1.c /obj=moria1.o
X  $ cc moria2.c /obj=moria2.o
X  $ cc potions.c /obj=potions.o
X+ $ cc player.c /obj=player.o
X  $ cc prayer.c /obj=prayer.o
X  $ cc save.c /obj=save.o
X  $ cc scrolls.c /obj=scrolls.o
X***************
X*** 26,31
X  $ cc staffs.c /obj=staffs.o
X  $ cc store1.c /obj=store1.o
X  $ cc store2.c /obj=store2.o
X  $ cc treasure1.c /obj=treasure1.o
X  $ cc treasure2.c /obj=treasure2.o
X  $ cc variables.c /obj=variables.o
X
X--- 27,33 -----
X  $ cc staffs.c /obj=staffs.o
X  $ cc store1.c /obj=store1.o
X  $ cc store2.c /obj=store2.o
X+ $ cc tables.c /obj=tables.o
X  $ cc treasure1.c /obj=treasure1.o
X  $ cc treasure2.c /obj=treasure2.o
X  $ cc variables.c /obj=variables.o
Xdiff -cr oldumoria/vms/moria.opt umoria/vms/moria.opt
X*** oldumoria/vms/moria.opt	Sat Feb 10 22:55:27 1990
X--- umoria/vms/moria.opt	Sun May 27 15:47:31 1990
X***************
X*** 2,8
X  generate.o,sets.o,dungeon.o,creature.o,death.o,eat.o,help.o,magic.o, -
X  potions.o,prayer.o,save.o,staffs.o,wands.o,scrolls.o,spells.o, -
X  wizard.o,store2.o,signals.o,moria1.o,moria2.o,monsters.o, -
X! treasure1.o,treasure2.o,variables.o, -
X  getch.o,cbreak.o,uexit.o,sys$library:vaxcrtl/share
X  ! ^ char input
X  !         ^ small stubs for cbreak(), nocbreak()
X
X--- 2,8 -----
X  generate.o,sets.o,dungeon.o,creature.o,death.o,eat.o,help.o,magic.o, -
X  potions.o,prayer.o,save.o,staffs.o,wands.o,scrolls.o,spells.o, -
X  wizard.o,store2.o,signals.o,moria1.o,moria2.o,monsters.o, -
X! treasure1.o,treasure2.o,variables.o,player.o,tables.o -
X  getch.o,cbreak.o,uexit.o,sys$library:vaxcrtl/share
X  ! ^ char input
X  !         ^ small stubs for cbreak(), nocbreak()
END_OF_FILE
if test 39060 -ne `wc -c <'patches01'`; then
    echo shar: \"'patches01'\" unpacked with wrong size!
fi
# end of 'patches01'
fi
if test -f 'source/tables.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'source/tables.c'\"
else
echo shar: Extracting \"'source/tables.c'\" \(10736 characters\)
sed "s/^X//" >'source/tables.c' <<'END_OF_FILE'
X/* tables.c: store/attack/RNG/etc tables and variables
X
X   Copyright (c) 1989 James E. Wilson, Robert A. Koeneke
X
X   This software may be copied and distributed for educational, research, and
X   not for profit purposes provided that this copyright and statement are
X   included in all such copies. */
X
X#include "constant.h"
X#include "config.h"
X#include "types.h"
X
X#ifdef MORIA_HOU
X/* Operating hours for Moria				-RAK-	*/
X/*	 X = Open; . = Closed					*/
Xchar  days[7][29] = { "SUN:XXXXXXXXXXXXXXXXXXXXXXXX",
X		    "MON:XXXXXXXX.........XXXXXXX",
X		    "TUE:XXXXXXXX.........XXXXXXX",
X		    "WED:XXXXXXXX.........XXXXXXX",
X		    "THU:XXXXXXXX.........XXXXXXX",
X		    "FRI:XXXXXXXX.........XXXXXXX",
X		    "SAT:XXXXXXXXXXXXXXXXXXXXXXXX" };
X#endif
X
X#ifdef MAC
Xstore_type *store;
X#else
Xstore_type store[MAX_STORES];
X#endif
X
X/* Store owners have different characteristics for pricing and haggling*/
X/* Note: Store owners should be added in groups, one for each store    */
X#ifdef MACGAME
Xowner_type *owners;
X#else
Xowner_type owners[MAX_OWNERS] = {
X{"Erick the Honest       (Human)      General Store",
X	  250,	175,  108,    4, 0, 12},
X{"Mauglin the Grumpy     (Dwarf)      Armory"	    ,
X	32000,	200,  112,    4, 5,  5},
X{"Arndal Beast-Slayer    (Half-Elf)   Weaponsmith"  ,
X	10000,	185,  110,    5, 1,  8},
X{"Hardblow the Humble    (Human)      Temple"	    ,
X	 3500,	175,  109,    6, 0, 15},
X{"Ga-nat the Greedy      (Gnome)      Alchemist"    ,
X	12000,	220,  115,    4, 4,  9},
X{"Valeria Starshine      (Elf)        Magic Shop"   ,
X	32000,	175,  110,    5, 2, 11},
X{"Andy the Friendly      (Halfling)   General Store",
X	  200,	170,  108,    5, 3, 15},
X{"Darg-Low the Grim      (Human)      Armory"	    ,
X	10000,	190,  111,    4, 0,  9},
X{"Oglign Dragon-Slayer   (Dwarf)      Weaponsmith"  ,
X	32000,	195,  112,    4, 5,  8},
X{"Gunnar the Paladin     (Human)      Temple"	    ,
X	 5000,	185,  110,    5, 0, 23},
X{"Mauser the Chemist     (Half-Elf)   Alchemist"    ,
X	10000,	190,  111,    5, 1,  8},
X{"Gopher the Great!      (Gnome)      Magic Shop"   ,
X	20000,	215,  113,    6, 4, 10},
X{"Lyar-el the Comely     (Elf)        General Store",
X	  300,	165,  107,    6, 2, 18},
X{"Mauglim the Horrible   (Half-Orc)   Armory"	    ,
X	 3000,	200,  113,    5, 6,  9},
X{"Ithyl-Mak the Beastly  (Half-Troll) Weaponsmith"  ,
X	 3000,	210,  115,    6, 7,  8},
X{"Delilah the Pure       (Half-Elf)   Temple"	    ,
X	25000,	180,  107,    6, 1, 20},
X{"Wizzle the Chaotic     (Halfling)   Alchemist"    ,
X	10000,	190,  110,    6, 3,  8},
X{"Inglorian the Mage     (Human?)     Magic Shop"   ,
X	32000,	200,  110,    7, 0, 10}
X};
X#endif
X
X/* Buying and selling adjustments for character race VS store	*/
X/* owner race							 */
Xint8u rgold_adj[MAX_RACES][MAX_RACES] = {
X			/*  Hum,  HfE,	Elf,  Hal,  Gno,  Dwa,	HfO,  HfT*/
X/*Human		 */	  {  100,  105,	 105,  110,  113,  115,	 120,  125},
X/*Half-Elf	 */	  {  110,  100,	 100,  105,  110,  120,	 125,  130},
X/*Elf		 */	  {  110,  105,	 100,  105,  110,  120,	 125,  130},
X/*Halfling	 */	  {  115,  110,	 105,	95,  105,  110,	 115,  130},
X/*Gnome		 */	  {  115,  115,	 110,  105,   95,  110,	 115,  130},
X/*Dwarf		 */	  {  115,  120,	 120,  110,  110,   95,	 125,  135},
X/*Half-Orc	 */	  {  115,  120,	 125,  115,  115,  130,	 110,  115},
X/*Half-Troll	 */	  {  110,  115,	 115,  110,  110,  130,	 110,  110}
X			};
X/* object_list[] index of objects that may appear in the store */
Xint16u store_choice[MAX_STORES][STORE_CHOICES] = {
X	/* General Store */
X{366,365,364,84,84,365,123,366,365,350,349,348,347,346,346,345,345,345,
X	344,344,344,344,344,344,344,344},
X	/* Armory	 */
X{95,96,97,103,104,105,106,110,111,112,119,121,124,125,126,127,129,95,103,
X	104,124,125,92,93,95,96},
X	/* Weaponsmith	 */
X{29,30,34,37,45,49,57,58,59,65,67,68,73,74,75,77,79,80,81,83,29,30,80,83,
X	80,83},
X	/* Temple	 */
X{322,323,324,325,180,180,233,237,240,241,361,362,57,58,59,260,358,359,265,
X	237,237,240,240,241,323,359},
X	/* Alchemy shop	 */
X{173,174,175,351,351,352,353,354,355,356,357,206,227,230,236,252,253,352,
X	353,354,355,356,359,363,359,359},
X	/* Magic-User store*/
X{318,141,142,153,164,167,168,140,319,320,320,321,269,270,282,286,287,292,
X	293,294,295,308,269,290,319,282}
X};
X
X#ifndef MAC
X/* MPW doesn't seem to handle this very well, so replace store_buy array
X   with a function call on mac */
X/* functions defined in sets.c */
Xextern int general_store(), armory(), weaponsmith(), temple(),
X  alchemist(), magic_shop();
X
X/* Each store will buy only certain items, based on TVAL */
Xint (*store_buy[MAX_STORES])() = {
X       general_store, armory, weaponsmith, temple, alchemist, magic_shop};
X#endif
X
X/* Following are arrays for descriptive pieces			*/
X
X#ifdef MACGAME
X
Xchar **colors;
Xchar **mushrooms;
Xchar **woods;
Xchar **metals;
Xchar **rocks;
Xchar **amulets;
Xchar **syllables;
X
X#else
X
Xchar *colors[MAX_COLORS] = {
X/* Do not move the first three */
X  "Icky Green", "Light Brown", "Clear",
X  "Azure","Blue","Blue Speckled","Black","Brown","Brown Speckled","Bubbling",
X  "Chartreuse","Cloudy","Copper Speckled","Crimson","Cyan","Dark Blue",
X  "Dark Green","Dark Red","Gold Speckled","Green","Green Speckled","Grey",
X  "Grey Speckled","Hazy","Indigo","Light Blue","Light Green","Magenta",
X  "Metallic Blue","Metallic Red","Metallic Green","Metallic Purple","Misty",
X  "Orange","Orange Speckled","Pink","Pink Speckled","Puce","Purple",
X  "Purple Speckled","Red","Red Speckled","Silver Speckled","Smoky",
X  "Tangerine","Violet","Vermilion","White","Yellow"
X};
X
Xchar *mushrooms[MAX_MUSH] = {
X  "Blue","Black","Black Spotted","Brown","Dark Blue","Dark Green","Dark Red",
X  "Ecru","Furry","Green","Grey","Light Blue","Light Green","Plaid","Red",
X  "Slimy","Tan","White","White Spotted","Wooden","Wrinkled","Yellow",
X};
X
Xchar *woods[MAX_WOODS] = {
X  "Aspen","Balsa","Banyan","Birch","Cedar","Cottonwood","Cypress","Dogwood",
X  "Elm","Eucalyptus","Hemlock","Hickory","Ironwood","Locust","Mahogany",
X  "Maple","Mulberry","Oak","Pine","Redwood","Rosewood","Spruce","Sycamore",
X  "Teak","Walnut",
X};
X
Xchar *metals[MAX_METALS] = {
X  "Aluminum","Cast Iron","Chromium","Copper","Gold","Iron","Magnesium",
X  "Molybdenum","Nickel","Rusty","Silver","Steel","Tin","Titanium","Tungsten",
X  "Zirconium","Zinc","Aluminum-Plated","Copper-Plated","Gold-Plated",
X  "Nickel-Plated","Silver-Plated","Steel-Plated","Tin-Plated","Zinc-Plated"
X};
X
Xchar *rocks[MAX_ROCKS] = {
X  "Alexandrite","Amethyst","Aquamarine","Azurite","Beryl","Bloodstone",
X  "Calcite","Carnelian","Corundum","Diamond","Emerald","Fluorite","Garnet",
X  "Granite","Jade","Jasper","Lapis Lazuli","Malachite","Marble","Moonstone",
X  "Onyx","Opal","Pearl","Quartz","Quartzite","Rhodonite","Ruby","Sapphire",
X  "Tiger Eye","Topaz","Turquoise","Zircon"
X};
X
Xchar *amulets[MAX_AMULETS] = {
X  "Amber","Driftwood","Coral","Agate","Ivory","Obsidian",
X  "Bone","Brass","Bronze","Pewter","Tortoise Shell"
X};
X
Xchar *syllables[MAX_SYLLABLES] = {
X  "a","ab","ag","aks","ala","an","ankh","app",
X  "arg","arze","ash","aus","ban","bar","bat","bek",
X  "bie","bin","bit","bjor","blu","bot","bu",
X  "byt","comp","con","cos","cre","dalf","dan",
X  "den","doe","dok","eep","el","eng","er","ere","erk",
X  "esh","evs","fa","fid","for","fri","fu","gan",
X  "gar","glen","gop","gre","ha","he","hyd","i",
X  "ing","ion","ip","ish","it","ite","iv","jo",
X  "kho","kli","klis","la","lech","man","mar",
X  "me","mi","mic","mik","mon","mung","mur","nej",
X  "nelg","nep","ner","nes","nis","nih","nin","o",
X  "od","ood","org","orn","ox","oxy","pay","pet",
X  "ple","plu","po","pot","prok","re","rea","rhov",
X  "ri","ro","rog","rok","rol","sa","san","sat",
X  "see","sef","seh","shu","ski","sna","sne","snik",
X  "sno","so","sol","sri","sta","sun","ta","tab",
X  "tem","ther","ti","tox","trol","tue","turs","u",
X  "ulk","um","un","uni","ur","val","viv","vly",
X  "vom","wah","wed","werg","wex","whon","wun","x",
X  "yerg","yp","zun"
X};
X#endif
X
X/* used to calculate the number of blows the player gets in combat */
Xint8u blows_table[7][6] = {
X/* STR/W:	   9  18  67 107 117 118   : DEX */
X/* <2 */	{  1,  1,  1,  1,  1,  1 },
X/* <3 */	{  1,  1,  1,  1,  2,  2 },
X/* <4 */	{  1,  1,  1,  2,  2,  3 },
X/* <5 */	{  1,  1,  2,  2,  3,  3 },
X/* <7 */	{  1,  2,  2,  3,  3,  4 },
X/* <9 */	{  1,  2,  2,  3,  4,  4 },
X/* >9 */	{  2,  2,  3,  3,  4,  4 }
X};
X
X/* this table is used to generate a psuedo-normal distribution.	 See the
X   function randnor() in misc1.c, this is much faster than calling
X   transcendental function to calculate a true normal distribution */
Xint16u normal_table[NORMAL_TABLE_SIZE] = {
X     206,     613,    1022,    1430,	1838,	 2245,	  2652,	   3058,
X    3463,    3867,    4271,    4673,	5075,	 5475,	  5874,	   6271,
X    6667,    7061,    7454,    7845,	8234,	 8621,	  9006,	   9389,
X    9770,   10148,   10524,   10898,   11269,	11638,	 12004,	  12367,
X   12727,   13085,   13440,   13792,   14140,	14486,	 14828,	  15168,
X   15504,   15836,   16166,   16492,   16814,	17133,	 17449,	  17761,
X   18069,   18374,   18675,   18972,   19266,	19556,	 19842,	  20124,
X   20403,   20678,   20949,   21216,   21479,	21738,	 21994,	  22245,
X   22493,   22737,   22977,   23213,   23446,	23674,	 23899,	  24120,
X   24336,   24550,   24759,   24965,   25166,	25365,	 25559,	  25750,
X   25937,   26120,   26300,   26476,   26649,	26818,	 26983,	  27146,
X   27304,   27460,   27612,   27760,   27906,	28048,	 28187,	  28323,
X   28455,   28585,   28711,   28835,   28955,	29073,	 29188,	  29299,
X   29409,   29515,   29619,   29720,   29818,	29914,	 30007,	  30098,
X   30186,   30272,   30356,   30437,   30516,	30593,	 30668,	  30740,
X   30810,   30879,   30945,   31010,   31072,	31133,	 31192,	  31249,
X   31304,   31358,   31410,   31460,   31509,	31556,	 31601,	  31646,
X   31688,   31730,   31770,   31808,   31846,	31882,	 31917,	  31950,
X   31983,   32014,   32044,   32074,   32102,	32129,	 32155,	  32180,
X   32205,   32228,   32251,   32273,   32294,	32314,	 32333,	  32352,
X   32370,   32387,   32404,   32420,   32435,	32450,	 32464,	  32477,
X   32490,   32503,   32515,   32526,   32537,	32548,	 32558,	  32568,
X   32577,   32586,   32595,   32603,   32611,	32618,	 32625,	  32632,
X   32639,   32645,   32651,   32657,   32662,	32667,	 32672,	  32677,
X   32682,   32686,   32690,   32694,   32698,	32702,	 32705,	  32708,
X   32711,   32714,   32717,   32720,   32722,	32725,	 32727,	  32729,
X   32731,   32733,   32735,   32737,   32739,	32740,	 32742,	  32743,
X   32745,   32746,   32747,   32748,   32749,	32750,	 32751,	  32752,
X   32753,   32754,   32755,   32756,   32757,	32757,	 32758,	  32758,
X   32759,   32760,   32760,   32761,   32761,	32761,	 32762,	  32762,
X   32763,   32763,   32763,   32764,   32764,	32764,	 32764,	  32765,
X   32765,   32765,   32765,   32766,   32766,	32766,	 32766,	  32766,
X};
END_OF_FILE
if test 10736 -ne `wc -c <'source/tables.c'`; then
    echo shar: \"'source/tables.c'\" unpacked with wrong size!
fi
# end of 'source/tables.c'
fi
if test ! -d 'util/printit' ; then
    echo shar: Creating directory \"'util/printit'\"
    mkdir 'util/printit'
fi
echo shar: End of archive 1 \(of 3\).
cp /dev/null ark1isdone
MISSING=""
for I in 1 2 3 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 3 archives.
    echo "Please read the file NOTES01."
    rm -f ark[1-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0