[comp.sources.games] v01i052: rogue - rogue 5.3 clone, Patch2

games-request@tekred.UUCP (06/13/87)

Submitted by: tims@zeus.TEK.COM (Tim Stoehr)
Comp.sources.games: Volume 1, Issue 52
Archive-name: rogue/Patch2

	[This is the official patch#2 for the rogue clone previously
	 posted to comp.sources.games.  As in Patch1, this posting
	 has two files: Tim's original list of changes (for those
	 wanting to do it by hand or wanting to check things out)
	 and a set of diffs suitable for the 'patch' program.  The
	 diffs rely on Patches01 being previously applied.  -br]

#! /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 shell archive."
# Contents:  Bugs2 Patches02
# Wrapped by billr@tekred on Fri Jun 12 14:41:14 1987
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f Bugs2 -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"Bugs2\"
else
echo shar: Extracting \"Bugs2\" \(2652 characters\)
sed "s/^X//" >Bugs2 <<'END_OF_Bugs2'
XHere is a second list of fixes for bugs and non-portable items found in my
Xrogue clone.  Many thanks to those who reported the problems, I would
Xappreciate any further reports, particularly if the stuff below does
Xnot fix what it is intended to fix.
X
X            Tim Stoehr
X            tims@zeus.TEK.COM
X    ----------------------------------------------------
X
X 1.)    Change SCROLL and SCROLLS to SCROL and SCROLS respectively
X        throughout the code.  This is to avoid conflicts with
X        some curses stuff.  If your compiler doesn't complain, you
X        probably don't have to worry about this.
X
X 2.)    Change ALL occurences of the symbol 'UP' to 'UPWARD'.  This prevents
X        the definition in rogue.h from clashing with the curses definition.
X
X 3.)    There may be a nested comment around line 41 in machdep.c.
X        Nuke it.
X
X 4.)    In zap.c, a new version of tele_away() was sent out.  That version
X        needs to have the global variable 'detect_monster' added to the
X        list of extern booleans at the top of zap.c, if it is not already
X        there.
X
X 5.)    In message.c, at the bottom of the routine message(), there is code
X        that looks like:
X
X        if (did_int) {
X            onintr();
X        }
X        cant_int = 0;
X
X        It should look like the following:
X
X        cant_int = 0;
X        if (did_int) {
X            did_int = 0;
X            onintr();
X        }
X
X 6.)   In machdep.c, the routine md_slurp() shoud be changed to what is
X       shown below, otherwise, messages get screwed up on UNIX_BSD4_2.
X       Only the BSD4_2 portion needs to be changed.
X
Xmd_slurp()
X{
X    long ln = 0;
X
X#ifdef UNIX_BSD4_2
X    ioctl(0, FIONREAD, &ln);
X#endif
X#ifdef UNIX_SYSV
X    ioctl(0, TCFLSH, &ln);
X    ln = 0;
X#endif
X
X    ln += stdin->_cnt;
X
X    for (; ln > 0; ln--) {
X        (void) getchar();
X    }
X}
X
X 7.)   In monster.c, in the table m_names near the top of the file,
X       change "aquatar" to "aquator" and "quasit" to "quagga."
X
X 8.)   References to curses internals should be removed for the sake
X       of portability/compatibility.
X
X       In score.c, in the routine quit(), change these two lines:
X
X        orow = curscr->_cury;
X        ocol = curscr->_curx;
X
X        to:
X
X        orow = rogue.row;
X        ocol = rogue.col;
X
X
X        And in message.c, in the routine save_screen(), remove these lines
X        which appear at the beginning of the routine:
X
X        row = curscr->_cury;
X        col = curscr->_curx;
X
X        and remove these lines which appear at the bottom of the routine:
X
X        move(row, col);
X        refresh();
X
X        You can also them remove the local variables, row and col.
END_OF_Bugs2
if test 2652 -ne `wc -c <Bugs2`; then
    echo shar: \"Bugs2\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f Patches02 -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"Patches02\"
else
echo shar: Extracting \"Patches02\" \(19425 characters\)
sed "s/^X//" >Patches02 <<'END_OF_Patches02'
X*** hit.c.orig	Fri May 29 14:20:03 1987
X--- hit.c	Fri Jun 12 13:39:57 1987
X***************
X*** 13,19 ****
X  #include "rogue.h"
X  
X  object *fight_monster = 0;
X- boolean detect_monster;
X  char hit_message[80] = "";
X  
X  extern short halluc, blind, cur_level;
X--- 13,18 ----
X*** inventory.c.orig	Fri May 29 14:20:35 1987
X--- inventory.c	Fri Jun 12 13:12:14 1987
X***************
X*** 184,190 ****
X  	short i, j, n;
X  	short sylls, s;
X  
X! 	for (i = 0; i < SCROLLS; i++) {
X  		sylls = get_rand(2, 5);
X  		(void) strcpy(id_scrolls[i].title, "'");
X  
X--- 184,190 ----
X  	short i, j, n;
X  	short sylls, s;
X  
X! 	for (i = 0; i < SCROLS; i++) {
X  		sylls = get_rand(2, 5);
X  		(void) strcpy(id_scrolls[i].title, "'");
X  
X***************
X*** 250,256 ****
X  	case UNIDENTIFIED:
X  CHECK:
X  		switch(obj->what_is) {
X! 		case SCROLL:
X  			(void) strcat(desc, item_name);
X  			(void) strcat(desc, "entitled: ");
X  			(void) strcat(desc, id_table[obj->which_kind].title);
X--- 250,256 ----
X  	case UNIDENTIFIED:
X  CHECK:
X  		switch(obj->what_is) {
X! 		case SCROL:
X  			(void) strcat(desc, item_name);
X  			(void) strcat(desc, "entitled: ");
X  			(void) strcat(desc, id_table[obj->which_kind].title);
X***************
X*** 287,293 ****
X  		break;
X  	case CALLED:
X  CALL:	switch(obj->what_is) {
X! 		case SCROLL:
X  		case POTION:
X  		case WAND:
X  		case RING:
X--- 287,293 ----
X  		break;
X  	case CALLED:
X  CALL:	switch(obj->what_is) {
X! 		case SCROL:
X  		case POTION:
X  		case WAND:
X  		case RING:
X***************
X*** 299,305 ****
X  		break;
X  	case IDENTIFIED:
X  ID:		switch(obj->what_is) {
X! 		case SCROLL:
X  		case POTION:
X  			(void) strcat(desc, item_name);
X  			(void) strcat(desc, id_table[obj->which_kind].real);
X--- 299,305 ----
X  		break;
X  	case IDENTIFIED:
X  ID:		switch(obj->what_is) {
X! 		case SCROL:
X  		case POTION:
X  			(void) strcat(desc, item_name);
X  			(void) strcat(desc, id_table[obj->which_kind].real);
X***************
X*** 419,425 ****
X  object *obj;
X  {
X  	switch(obj->what_is) {
X! 	case SCROLL:
X  		return(id_scrolls);
X  	case POTION:
X  		return(id_potions);
X--- 419,425 ----
X  object *obj;
X  {
X  	switch(obj->what_is) {
X! 	case SCROL:
X  		return(id_scrolls);
X  	case POTION:
X  		return(id_potions);
X*** level.c.orig	Fri May 29 14:20:48 1987
X--- level.c	Fri Jun 12 13:13:22 1987
X***************
X*** 275,287 ****
X  		dir = RIGHT;
X  	} else if (same_col(room1, room2) &&
X  		(rooms[room1].top_row > rooms[room2].bottom_row)) {
X! 		put_door(&rooms[room1], UP, &row1, &col1);
X  		put_door(&rooms[room2], DOWN, &row2, &col2);
X! 		dir = UP;
X  	} else if (same_col(room1, room2) &&
X  		(rooms[room2].top_row > rooms[room1].bottom_row)) {
X  		put_door(&rooms[room1], DOWN, &row1, &col1);
X! 		put_door(&rooms[room2], UP, &row2, &col2);
X  		dir = DOWN;
X  	} else {
X  		return(0);
X--- 275,287 ----
X  		dir = RIGHT;
X  	} else if (same_col(room1, room2) &&
X  		(rooms[room1].top_row > rooms[room2].bottom_row)) {
X! 		put_door(&rooms[room1], UPWARD, &row1, &col1);
X  		put_door(&rooms[room2], DOWN, &row2, &col2);
X! 		dir = UPWARD;
X  	} else if (same_col(room1, room2) &&
X  		(rooms[room2].top_row > rooms[room1].bottom_row)) {
X  		put_door(&rooms[room1], DOWN, &row1, &col1);
X! 		put_door(&rooms[room2], UPWARD, &row2, &col2);
X  		dir = DOWN;
X  	} else {
X  		return(0);
X***************
X*** 337,345 ****
X  	wall_width = (rm->is_room & R_MAZE) ? 0 : 1;
X  
X  	switch(dir) {
X! 	case UP:
X  	case DOWN:
X! 		*row = ((dir == UP) ? rm->top_row : rm->bottom_row);
X  		do {
X  			*col = get_rand(rm->left_col+wall_width,
X  				rm->right_col-wall_width);
X--- 337,345 ----
X  	wall_width = (rm->is_room & R_MAZE) ? 0 : 1;
X  
X  	switch(dir) {
X! 	case UPWARD:
X  	case DOWN:
X! 		*row = ((dir == UPWARD) ? rm->top_row : rm->bottom_row);
X  		do {
X  			*col = get_rand(rm->left_col+wall_width,
X  				rm->right_col-wall_width);
X***************
X*** 497,503 ****
X  				RIGHT : LEFT;
X  		} else {
X  			tunnel_dir = (rooms[rn].top_row < rooms[target_room].top_row) ?
X! 				DOWN : UP;
X  		}
X  		door_dir = ((tunnel_dir + 4) % DIRS);
X  		if (rooms[target_room].doors[door_dir/2].oth_room != NO_ROOM) {
X--- 497,503 ----
X  				RIGHT : LEFT;
X  		} else {
X  			tunnel_dir = (rooms[rn].top_row < rooms[target_room].top_row) ?
X! 				DOWN : UPWARD;
X  		}
X  		door_dir = ((tunnel_dir + 4) % DIRS);
X  		if (rooms[target_room].doors[door_dir/2].oth_room != NO_ROOM) {
X***************
X*** 554,560 ****
X  				RIGHT : LEFT;
X  		} else {
X  			tunnel_dir = (rooms[rn].top_row < rooms[de].top_row) ?
X! 				DOWN : UP;
X  		}
X  		draw_simple_passage(srow, scol, drow, dcol, tunnel_dir);
X  		r_de = de;
X--- 554,560 ----
X  				RIGHT : LEFT;
X  		} else {
X  			tunnel_dir = (rooms[rn].top_row < rooms[de].top_row) ?
X! 				DOWN : UPWARD;
X  		}
X  		draw_simple_passage(srow, scol, drow, dcol, tunnel_dir);
X  		r_de = de;
X***************
X*** 588,594 ****
X  	char dirs[4];
X  	short i, t;
X  
X! 	dirs[0] = UP;
X  	dirs[1] = DOWN;
X  	dirs[2] = LEFT;
X  	dirs[3] = RIGHT;
X--- 588,594 ----
X  	char dirs[4];
X  	short i, t;
X  
X! 	dirs[0] = UPWARD;
X  	dirs[1] = DOWN;
X  	dirs[2] = LEFT;
X  	dirs[3] = RIGHT;
X***************
X*** 607,613 ****
X  	}
X  	for (i = 0; i < 4; i++) {
X  		switch(dirs[i]) {
X! 		case UP:
X  			if (((r-1) >= tr) &&
X  				(dungeon[r-1][c] != TUNNEL) &&
X  				(dungeon[r-1][c-1] != TUNNEL) &&
X--- 607,613 ----
X  	}
X  	for (i = 0; i < 4; i++) {
X  		switch(dirs[i]) {
X! 		case UPWARD:
X  			if (((r-1) >= tr) &&
X  				(dungeon[r-1][c] != TUNNEL) &&
X  				(dungeon[r-1][c-1] != TUNNEL) &&
X*** machdep.c.orig	Fri Jun 12 13:30:16 1987
X--- machdep.c	Fri Jun 12 13:19:48 1987
X***************
X*** 39,45 ****
X   *      #else
X   *         code;
X   *      #endif /* UNIX_SYSV */
X!  *      }
X   *
X   * Appropriate variations of this are of course acceptible.
X   * The use of "#elseif" is discouraged because of non-portability.
X--- 39,45 ----
X   *      #else
X   *         code;
X   *      #endif /* UNIX_SYSV */
X! /*      }
X   *
X   * Appropriate variations of this are of course acceptible.
X   * The use of "#elseif" is discouraged because of non-portability.
X***************
X*** 82,97 ****
X  
X  md_slurp()
X  {
X! 	long ln;
X  
X  #ifdef UNIX_BSD4_2
X! 	ioctl(0, TIOCFLUSH, &ln);
X  #endif /* UNIX_BSD4_2 */
X  #ifdef UNIX_SYSV
X  	ioctl(0, TCFLSH, &ln);
X  #endif /* UNIX_SYSV */
X  
X! 	for (ln = stdin->_cnt; ln > 0; ln--) {
X  		(void) getchar();
X  	}
X  }
X--- 82,100 ----
X  
X  md_slurp()
X  {
X! 	long ln = 0;
X  
X  #ifdef UNIX_BSD4_2
X! 	ioctl(0, FIONREAD, &ln);
X  #endif /* UNIX_BSD4_2 */
X  #ifdef UNIX_SYSV
X  	ioctl(0, TCFLSH, &ln);
X+ 	ln = 0;
X  #endif /* UNIX_SYSV */
X  
X! 	ln += stdin->_cnt;
X! 
X! 	for (; ln > 0; ln--) {
X  		(void) getchar();
X  	}
X  }
X*** message.c.orig	Fri May 29 14:21:38 1987
X--- message.c	Fri Jun 12 13:21:44 1987
X***************
X*** 48,57 ****
X  	msg_cleared = 0;
X  	msg_col = strlen(msg);
X  
X  	if (did_int) {
X  		onintr();
X  	}
X- 	cant_int = 0;
X  }
X  
X  remessage()
X--- 48,58 ----
X  	msg_cleared = 0;
X  	msg_col = strlen(msg);
X  
X+ 	cant_int = 0;
X  	if (did_int) {
X+ 		did_int = 0;
X  		onintr();
X  	}
X  }
X  
X  remessage()
X***************
X*** 256,268 ****
X  save_screen()
X  {
X  	FILE *fp;
X! 	short i, j, row, col;
X  	char buf[DCOLS+2];
X  	boolean found_non_blank;
X  
X- 	row = curscr->_cury;
X- 	col = curscr->_curx;
X- 
X  	if ((fp = fopen("rogue.screen", "w")) != NULL) {
X  		for (i = 0; i < DROWS; i++) {
X  			found_non_blank = 0;
X--- 257,266 ----
X  save_screen()
X  {
X  	FILE *fp;
X! 	short i, j;
X  	char buf[DCOLS+2];
X  	boolean found_non_blank;
X  
X  	if ((fp = fopen("rogue.screen", "w")) != NULL) {
X  		for (i = 0; i < DROWS; i++) {
X  			found_non_blank = 0;
X***************
X*** 282,289 ****
X  	} else {
X  		sound_bell();
X  	}
X- 	move(row, col);
X- 	refresh();
X  }
X  
X  sound_bell()
X--- 280,285 ----
X*** monster.c.orig	Fri May 29 14:21:49 1987
X--- monster.c	Fri Jun 12 13:23:13 1987
X***************
X*** 16,22 ****
X  boolean mon_disappeared;
X  
X  char *m_names[] = {
X! 	"aquatar",
X  	"bat",
X  	"centaur",
X  	"dragon",
X--- 16,22 ----
X  boolean mon_disappeared;
X  
X  char *m_names[] = {
X! 	"aquator",
X  	"bat",
X  	"centaur",
X  	"dragon",
X***************
X*** 32,38 ****
X  	"nymph",
X  	"orc",
X  	"phantom",
X! 	"quasit",
X  	"rattlesnake",
X  	"snake",
X  	"troll",
X--- 32,38 ----
X  	"nymph",
X  	"orc",
X  	"phantom",
X! 	"quagga",
X  	"rattlesnake",
X  	"snake",
X  	"troll",
X***************
X*** 479,485 ****
X  	}
X  	if (dungeon[row][col] & OBJECT) {
X  		obj = object_at(&level_objects, row, col);
X! 		if ((obj->what_is == SCROLL) && (obj->which_kind == SCARE_MONSTER)) {
X  			return(0);
X  		}
X  	}
X--- 479,485 ----
X  	}
X  	if (dungeon[row][col] & OBJECT) {
X  		obj = object_at(&level_objects, row, col);
X! 		if ((obj->what_is == SCROL) && (obj->which_kind == SCARE_MONSTER)) {
X  			return(0);
X  		}
X  	}
X*** object.c.orig	Fri May 29 14:22:10 1987
X--- object.c	Fri Jun 12 13:24:01 1987
X***************
X*** 50,56 ****
X  {145, "beige \0                          ", "of see invisible ", 0}
X  };
X  
X! struct id id_scrolls[SCROLLS] = {
X  {505, "                                   ", "of protect armor ", 0},
X  {200, "                                   ", "of hold monster ", 0},
X  {235, "                                   ", "of enchant weapon ", 0},
X--- 50,56 ----
X  {145, "beige \0                          ", "of see invisible ", 0}
X  };
X  
X! struct id id_scrolls[SCROLS] = {
X  {505, "                                   ", "of protect armor ", 0},
X  {200, "                                   ", "of hold monster ", 0},
X  {235, "                                   ", "of enchant weapon ", 0},
X***************
X*** 244,250 ****
X  	char *retstring;
X  
X  	switch(obj->what_is) {
X! 	case SCROLL:
X  		retstring = obj->quantity > 1 ? "scrolls " : "scroll ";
X  		break;
X  	case POTION:
X--- 244,250 ----
X  	char *retstring;
X  
X  	switch(obj->what_is) {
X! 	case SCROL:
X  		retstring = obj->quantity > 1 ? "scrolls " : "scroll ";
X  		break;
X  	case POTION:
X***************
X*** 308,314 ****
X  		obj->what_is = gr_what_is();
X  	}
X  	switch(obj->what_is) {
X! 	case SCROLL:
X  		gr_scroll(obj);
X  		break;
X  	case POTION:
X--- 308,314 ----
X  		obj->what_is = gr_what_is();
X  	}
X  	switch(obj->what_is) {
X! 	case SCROL:
X  		gr_scroll(obj);
X  		break;
X  	case POTION:
X***************
X*** 342,348 ****
X  	percent = get_rand(1, 91);
X  
X  	if (percent <= 30) {
X! 		what_is = SCROLL;
X  	} else if (percent <= 60) {
X  		what_is = POTION;
X  	} else if (percent <= 64) {
X--- 342,348 ----
X  	percent = get_rand(1, 91);
X  
X  	if (percent <= 30) {
X! 		what_is = SCROL;
X  	} else if (percent <= 60) {
X  		what_is = POTION;
X  	} else if (percent <= 64) {
X***************
X*** 366,372 ****
X  
X  	percent = get_rand(0, 85);
X  
X! 	obj->what_is = SCROLL;
X  
X  	if (percent <= 5) {
X  		obj->which_kind = PROTECT_ARMOR;
X--- 366,372 ----
X  
X  	percent = get_rand(0, 85);
X  
X! 	obj->what_is = SCROL;
X  
X  	if (percent <= 5) {
X  		obj->which_kind = PROTECT_ARMOR;
X***************
X*** 694,701 ****
X  		max = POTIONS - 1;
X  		break;
X  	case '?':
X! 		obj->what_is = SCROLL;
X! 		max = SCROLLS - 1;
X  		break;
X  	case ',':
X  		obj->what_is = AMULET;
X--- 694,701 ----
X  		max = POTIONS - 1;
X  		break;
X  	case '?':
X! 		obj->what_is = SCROL;
X! 		max = SCROLS - 1;
X  		break;
X  	case ',':
X  		obj->what_is = AMULET;
X*** pack.c.orig	Fri May 29 14:22:20 1987
X--- pack.c	Fri Jun 12 13:24:32 1987
X***************
X*** 60,66 ****
X  	obj = object_at(&level_objects, row, col);
X  	*status = 1;
X  
X! 	if ((obj->what_is == SCROLL) && (obj->which_kind == SCARE_MONSTER) &&
X  		obj->picked_up) {
X  		message("the scroll turns to dust as you pick it up", 0);
X  		dungeon[row][col] &= (~OBJECT);
X--- 60,66 ----
X  	obj = object_at(&level_objects, row, col);
X  	*status = 1;
X  
X! 	if ((obj->what_is == SCROL) && (obj->which_kind == SCARE_MONSTER) &&
X  		obj->picked_up) {
X  		message("the scroll turns to dust as you pick it up", 0);
X  		dungeon[row][col] &= (~OBJECT);
X***************
X*** 157,163 ****
X  {
X  	object *op;
X  
X! 	if (!(obj->what_is & (WEAPON | FOOD | SCROLL | POTION))) {
X  		return(0);
X  	}
X  	if ((obj->what_is == FOOD) && (obj->which_kind == FRUIT)) {
X--- 157,163 ----
X  {
X  	object *op;
X  
X! 	if (!(obj->what_is & (WEAPON | FOOD | SCROL | POTION))) {
X  		return(0);
X  	}
X  	if ((obj->what_is == FOOD) && (obj->which_kind == FRUIT)) {
X***************
X*** 380,386 ****
X  	struct id *id_table;
X  	char buf[MAX_TITLE_LENGTH+2];
X  
X! 	ch = pack_letter("call what?", (SCROLL | POTION | WAND | RING));
X  
X  	if (ch == CANCEL) {
X  		return;
X--- 380,386 ----
X  	struct id *id_table;
X  	char buf[MAX_TITLE_LENGTH+2];
X  
X! 	ch = pack_letter("call what?", (SCROL | POTION | WAND | RING));
X  
X  	if (ch == CANCEL) {
X  		return;
X***************
X*** 389,395 ****
X  		message("no such item.", 0);
X  		return;
X  	}
X! 	if (!(obj->what_is & (SCROLL | POTION | WAND | RING))) {
X  		message("surely you already know what that's called", 0);
X  		return;
X  	}
X--- 389,395 ----
X  		message("no such item.", 0);
X  		return;
X  	}
X! 	if (!(obj->what_is & (SCROL | POTION | WAND | RING))) {
X  		message("surely you already know what that's called", 0);
X  		return;
X  	}
X***************
X*** 450,456 ****
X  		(*c == ')') || (*c == ']') || (*c == '/') || (*c == ','))) {
X  		switch(*c) {
X  		case '?':
X! 			*mask = SCROLL;
X  			break;
X  		case '!':
X  			*mask = POTION;
X--- 450,456 ----
X  		(*c == ')') || (*c == ']') || (*c == '/') || (*c == ','))) {
X  		switch(*c) {
X  		case '?':
X! 			*mask = SCROL;
X  			break;
X  		case '!':
X  			*mask = POTION;
X*** patchlevel.h.orig	Thu May 28 15:06:56 1987
X--- patchlevel.h	Fri Jun 12 13:24:41 1987
X***************
X*** 1 ****
X! #define PATCHLEVEL 1
X--- 1 ----
X! #define PATCHLEVEL 2
X*** rogue.h.orig	Fri May 29 14:18:42 1987
X--- rogue.h	Fri Jun 12 13:25:27 1987
X***************
X*** 26,32 ****
X  
X  #define ARMOR		((unsigned short)   01)
X  #define WEAPON		((unsigned short)   02)
X! #define SCROLL		((unsigned short)   04)
X  #define POTION		((unsigned short)  010)
X  #define GOLD		((unsigned short)  020)
X  #define FOOD		((unsigned short)  040)
X--- 26,32 ----
X  
X  #define ARMOR		((unsigned short)   01)
X  #define WEAPON		((unsigned short)   02)
X! #define SCROL		((unsigned short)   04)
X  #define POTION		((unsigned short)  010)
X  #define GOLD		((unsigned short)  020)
X  #define FOOD		((unsigned short)  040)
X***************
X*** 68,74 ****
X  #define CREATE_MONSTER 9
X  #define AGGRAVATE_MONSTER 10
X  #define MAGIC_MAPPING 11
X! #define SCROLLS 12
X  
X  #define INCREASE_STRENGTH 0
X  #define RESTORE_STRENGTH 1
X--- 68,74 ----
X  #define CREATE_MONSTER 9
X  #define AGGRAVATE_MONSTER 10
X  #define MAGIC_MAPPING 11
X! #define SCROLS 12
X  
X  #define INCREASE_STRENGTH 0
X  #define RESTORE_STRENGTH 1
X***************
X*** 345,351 ****
X  #define QUIT 4
X  #define WIN 5
X  
X! #define UP 0
X  #define UPRIGHT 1
X  #define RIGHT 2
X  #define RIGHTDOWN 3
X--- 345,351 ----
X  #define QUIT 4
X  #define WIN 5
X  
X! #define UPWARD 0
X  #define UPRIGHT 1
X  #define RIGHT 2
X  #define RIGHTDOWN 3
X*** room.c.orig	Fri May 29 14:22:54 1987
X--- room.c	Fri Jun 12 13:25:59 1987
X***************
X*** 140,146 ****
X  register unsigned short mask;
X  {
X  		switch(mask) {
X! 		case SCROLL:
X  			return('?');
X  		case POTION:
X  			return('!');
X--- 140,146 ----
X  register unsigned short mask;
X  {
X  		switch(mask) {
X! 		case SCROL:
X  			return('?');
X  		case POTION:
X  			return('!');
X***************
X*** 404,410 ****
X  	short d = -1;
X  
X  	if (*row == rooms[rn].top_row) {
X! 		d = UP/2;
X  	} else if (*row == rooms[rn].bottom_row) {
X  		d = DOWN/2;
X  	} else if (*col == rooms[rn].left_col) {
X--- 404,410 ----
X  	short d = -1;
X  
X  	if (*row == rooms[rn].top_row) {
X! 		d = UPWARD/2;
X  	} else if (*row == rooms[rn].bottom_row) {
X  		d = DOWN/2;
X  	} else if (*col == rooms[rn].left_col) {
X*** save.c.orig	Fri May 29 14:24:31 1987
X--- save.c	Fri Jun 12 13:26:27 1987
X***************
X*** 92,98 ****
X  	r_write(fp, (char *) &rogue, sizeof(fighter));
X  	write_pack(&rogue.pack, fp);
X  	rw_id(id_potions, fp, POTIONS, 1);
X! 	rw_id(id_scrolls, fp, SCROLLS, 1);
X  	rw_id(id_wands, fp, WANDS, 1);
X  	rw_id(id_rings, fp, RINGS, 1);
X  	r_write(fp, (char *) traps, (MAX_TRAPS * sizeof(trap)));
X--- 92,98 ----
X  	r_write(fp, (char *) &rogue, sizeof(fighter));
X  	write_pack(&rogue.pack, fp);
X  	rw_id(id_potions, fp, POTIONS, 1);
X! 	rw_id(id_scrolls, fp, SCROLS, 1);
X  	rw_id(id_wands, fp, WANDS, 1);
X  	rw_id(id_rings, fp, RINGS, 1);
X  	r_write(fp, (char *) traps, (MAX_TRAPS * sizeof(trap)));
X***************
X*** 164,170 ****
X  	r_read(fp, (char *) &rogue, sizeof(fighter));
X  	read_pack(&rogue.pack, fp, 1);
X  	rw_id(id_potions, fp, POTIONS, 0);
X! 	rw_id(id_scrolls, fp, SCROLLS, 0);
X  	rw_id(id_wands, fp, WANDS, 0);
X  	rw_id(id_rings, fp, RINGS, 0);
X  	r_read(fp, (char *) traps, (MAX_TRAPS * sizeof(trap)));
X--- 164,170 ----
X  	r_read(fp, (char *) &rogue, sizeof(fighter));
X  	read_pack(&rogue.pack, fp, 1);
X  	rw_id(id_potions, fp, POTIONS, 0);
X! 	rw_id(id_scrolls, fp, SCROLS, 0);
X  	rw_id(id_wands, fp, WANDS, 0);
X  	rw_id(id_rings, fp, RINGS, 0);
X  	r_read(fp, (char *) traps, (MAX_TRAPS * sizeof(trap)));
X*** score.c.orig	Fri May 29 14:25:01 1987
X--- score.c	Fri Jun 12 13:27:40 1987
X***************
X*** 120,127 ****
X  
X  	if (from_intrpt) {
X  
X! 		orow = curscr->_cury;
X! 		ocol = curscr->_curx;
X  		mc = msg_cleared;
X  
X  		for (i = 0; i < DCOLS; i++) {
X--- 120,127 ----
X  
X  	if (from_intrpt) {
X  
X! 		orow = rogue.row;
X! 		ocol = rogue.col;
X  		mc = msg_cleared;
X  
X  		for (i = 0; i < DCOLS; i++) {
X***************
X*** 403,409 ****
X  	case WAND:
X  		val = id_wands[wc].value * (obj->class + 1);
X  		break;
X! 	case SCROLL:
X  		val = id_scrolls[wc].value * obj->quantity;
X  		break;
X  	case POTION:
X--- 403,409 ----
X  	case WAND:
X  		val = id_wands[wc].value * (obj->class + 1);
X  		break;
X! 	case SCROL:
X  		val = id_scrolls[wc].value * obj->quantity;
X  		break;
X  	case POTION:
X***************
X*** 426,432 ****
X  {
X  	short i;
X  
X! 	for (i = 0; i < SCROLLS; i++) {
X  		id_scrolls[i].id_status = IDENTIFIED;
X  	}
X  	for (i = 0; i < WEAPONS; i++) {
X--- 426,432 ----
X  {
X  	short i;
X  
X! 	for (i = 0; i < SCROLS; i++) {
X  		id_scrolls[i].id_status = IDENTIFIED;
X  	}
X  	for (i = 0; i < WEAPONS; i++) {
X*** use.c.orig	Fri May 29 14:25:52 1987
X--- use.c	Fri Jun 12 13:28:05 1987
X***************
X*** 148,154 ****
X  	object *obj;
X  	char msg[DCOLS];
X  
X! 	ch = pack_letter("read what?", SCROLL);
X  
X  	if (ch == CANCEL) {
X  		return;
X--- 148,154 ----
X  	object *obj;
X  	char msg[DCOLS];
X  
X! 	ch = pack_letter("read what?", SCROL);
X  
X  	if (ch == CANCEL) {
X  		return;
X***************
X*** 157,163 ****
X  		message("no such item.", 0);
X  		return;
X  	}
X! 	if (obj->what_is != SCROLL) {
X  		message("you can't read that", 0);
X  		return;
X  	}
X--- 157,163 ----
X  		message("no such item.", 0);
X  		return;
X  	}
X! 	if (obj->what_is != SCROL) {
X  		message("you can't read that", 0);
X  		return;
X  	}
X***************
X*** 336,342 ****
X  		goto AGAIN;
X  	}
X  	obj->identified = 1;
X! 	if (obj->what_is & (SCROLL | POTION | WEAPON | ARMOR | WAND | RING)) {
X  		id_table = get_id_table(obj);
X  		id_table[obj->which_kind].id_status = IDENTIFIED;
X  	}
X--- 336,342 ----
X  		goto AGAIN;
X  	}
X  	obj->identified = 1;
X! 	if (obj->what_is & (SCROL | POTION | WEAPON | ARMOR | WAND | RING)) {
X  		id_table = get_id_table(obj);
X  		id_table[obj->which_kind].id_status = IDENTIFIED;
X  	}
X*** zap.c.orig	Fri May 29 14:26:04 1987
X--- zap.c	Fri Jun 12 13:29:07 1987
X***************
X*** 14,20 ****
X  
X  boolean wizard = 0;
X  
X! extern boolean being_held, score_only;
X  
X  zapp()
X  {
X--- 14,20 ----
X  
X  boolean wizard = 0;
X  
X! extern boolean being_held, score_only, detect_monster;
X  
X  zapp()
X  {
END_OF_Patches02
if test 19425 -ne `wc -c <Patches02`; then
    echo shar: \"Patches02\" unpacked with wrong size!
fi
# end of overwriting check
fi
echo shar: End of shell archive.
exit 0