home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
games
/
volume1
/
rogue
/
patch2
/
Patches02
< prev
Wrap
Text File
|
1987-06-12
|
19KB
|
845 lines
*** hit.c.orig Fri May 29 14:20:03 1987
--- hit.c Fri Jun 12 13:39:57 1987
***************
*** 13,19 ****
#include "rogue.h"
object *fight_monster = 0;
- boolean detect_monster;
char hit_message[80] = "";
extern short halluc, blind, cur_level;
--- 13,18 ----
*** inventory.c.orig Fri May 29 14:20:35 1987
--- inventory.c Fri Jun 12 13:12:14 1987
***************
*** 184,190 ****
short i, j, n;
short sylls, s;
! for (i = 0; i < SCROLLS; i++) {
sylls = get_rand(2, 5);
(void) strcpy(id_scrolls[i].title, "'");
--- 184,190 ----
short i, j, n;
short sylls, s;
! for (i = 0; i < SCROLS; i++) {
sylls = get_rand(2, 5);
(void) strcpy(id_scrolls[i].title, "'");
***************
*** 250,256 ****
case UNIDENTIFIED:
CHECK:
switch(obj->what_is) {
! case SCROLL:
(void) strcat(desc, item_name);
(void) strcat(desc, "entitled: ");
(void) strcat(desc, id_table[obj->which_kind].title);
--- 250,256 ----
case UNIDENTIFIED:
CHECK:
switch(obj->what_is) {
! case SCROL:
(void) strcat(desc, item_name);
(void) strcat(desc, "entitled: ");
(void) strcat(desc, id_table[obj->which_kind].title);
***************
*** 287,293 ****
break;
case CALLED:
CALL: switch(obj->what_is) {
! case SCROLL:
case POTION:
case WAND:
case RING:
--- 287,293 ----
break;
case CALLED:
CALL: switch(obj->what_is) {
! case SCROL:
case POTION:
case WAND:
case RING:
***************
*** 299,305 ****
break;
case IDENTIFIED:
ID: switch(obj->what_is) {
! case SCROLL:
case POTION:
(void) strcat(desc, item_name);
(void) strcat(desc, id_table[obj->which_kind].real);
--- 299,305 ----
break;
case IDENTIFIED:
ID: switch(obj->what_is) {
! case SCROL:
case POTION:
(void) strcat(desc, item_name);
(void) strcat(desc, id_table[obj->which_kind].real);
***************
*** 419,425 ****
object *obj;
{
switch(obj->what_is) {
! case SCROLL:
return(id_scrolls);
case POTION:
return(id_potions);
--- 419,425 ----
object *obj;
{
switch(obj->what_is) {
! case SCROL:
return(id_scrolls);
case POTION:
return(id_potions);
*** level.c.orig Fri May 29 14:20:48 1987
--- level.c Fri Jun 12 13:13:22 1987
***************
*** 275,287 ****
dir = RIGHT;
} else if (same_col(room1, room2) &&
(rooms[room1].top_row > rooms[room2].bottom_row)) {
! put_door(&rooms[room1], UP, &row1, &col1);
put_door(&rooms[room2], DOWN, &row2, &col2);
! dir = UP;
} else if (same_col(room1, room2) &&
(rooms[room2].top_row > rooms[room1].bottom_row)) {
put_door(&rooms[room1], DOWN, &row1, &col1);
! put_door(&rooms[room2], UP, &row2, &col2);
dir = DOWN;
} else {
return(0);
--- 275,287 ----
dir = RIGHT;
} else if (same_col(room1, room2) &&
(rooms[room1].top_row > rooms[room2].bottom_row)) {
! put_door(&rooms[room1], UPWARD, &row1, &col1);
put_door(&rooms[room2], DOWN, &row2, &col2);
! dir = UPWARD;
} else if (same_col(room1, room2) &&
(rooms[room2].top_row > rooms[room1].bottom_row)) {
put_door(&rooms[room1], DOWN, &row1, &col1);
! put_door(&rooms[room2], UPWARD, &row2, &col2);
dir = DOWN;
} else {
return(0);
***************
*** 337,345 ****
wall_width = (rm->is_room & R_MAZE) ? 0 : 1;
switch(dir) {
! case UP:
case DOWN:
! *row = ((dir == UP) ? rm->top_row : rm->bottom_row);
do {
*col = get_rand(rm->left_col+wall_width,
rm->right_col-wall_width);
--- 337,345 ----
wall_width = (rm->is_room & R_MAZE) ? 0 : 1;
switch(dir) {
! case UPWARD:
case DOWN:
! *row = ((dir == UPWARD) ? rm->top_row : rm->bottom_row);
do {
*col = get_rand(rm->left_col+wall_width,
rm->right_col-wall_width);
***************
*** 497,503 ****
RIGHT : LEFT;
} else {
tunnel_dir = (rooms[rn].top_row < rooms[target_room].top_row) ?
! DOWN : UP;
}
door_dir = ((tunnel_dir + 4) % DIRS);
if (rooms[target_room].doors[door_dir/2].oth_room != NO_ROOM) {
--- 497,503 ----
RIGHT : LEFT;
} else {
tunnel_dir = (rooms[rn].top_row < rooms[target_room].top_row) ?
! DOWN : UPWARD;
}
door_dir = ((tunnel_dir + 4) % DIRS);
if (rooms[target_room].doors[door_dir/2].oth_room != NO_ROOM) {
***************
*** 554,560 ****
RIGHT : LEFT;
} else {
tunnel_dir = (rooms[rn].top_row < rooms[de].top_row) ?
! DOWN : UP;
}
draw_simple_passage(srow, scol, drow, dcol, tunnel_dir);
r_de = de;
--- 554,560 ----
RIGHT : LEFT;
} else {
tunnel_dir = (rooms[rn].top_row < rooms[de].top_row) ?
! DOWN : UPWARD;
}
draw_simple_passage(srow, scol, drow, dcol, tunnel_dir);
r_de = de;
***************
*** 588,594 ****
char dirs[4];
short i, t;
! dirs[0] = UP;
dirs[1] = DOWN;
dirs[2] = LEFT;
dirs[3] = RIGHT;
--- 588,594 ----
char dirs[4];
short i, t;
! dirs[0] = UPWARD;
dirs[1] = DOWN;
dirs[2] = LEFT;
dirs[3] = RIGHT;
***************
*** 607,613 ****
}
for (i = 0; i < 4; i++) {
switch(dirs[i]) {
! case UP:
if (((r-1) >= tr) &&
(dungeon[r-1][c] != TUNNEL) &&
(dungeon[r-1][c-1] != TUNNEL) &&
--- 607,613 ----
}
for (i = 0; i < 4; i++) {
switch(dirs[i]) {
! case UPWARD:
if (((r-1) >= tr) &&
(dungeon[r-1][c] != TUNNEL) &&
(dungeon[r-1][c-1] != TUNNEL) &&
*** machdep.c.orig Fri Jun 12 13:30:16 1987
--- machdep.c Fri Jun 12 13:19:48 1987
***************
*** 39,45 ****
* #else
* code;
* #endif /* UNIX_SYSV */
! * }
*
* Appropriate variations of this are of course acceptible.
* The use of "#elseif" is discouraged because of non-portability.
--- 39,45 ----
* #else
* code;
* #endif /* UNIX_SYSV */
! /* }
*
* Appropriate variations of this are of course acceptible.
* The use of "#elseif" is discouraged because of non-portability.
***************
*** 82,97 ****
md_slurp()
{
! long ln;
#ifdef UNIX_BSD4_2
! ioctl(0, TIOCFLUSH, &ln);
#endif /* UNIX_BSD4_2 */
#ifdef UNIX_SYSV
ioctl(0, TCFLSH, &ln);
#endif /* UNIX_SYSV */
! for (ln = stdin->_cnt; ln > 0; ln--) {
(void) getchar();
}
}
--- 82,100 ----
md_slurp()
{
! long ln = 0;
#ifdef UNIX_BSD4_2
! ioctl(0, FIONREAD, &ln);
#endif /* UNIX_BSD4_2 */
#ifdef UNIX_SYSV
ioctl(0, TCFLSH, &ln);
+ ln = 0;
#endif /* UNIX_SYSV */
! ln += stdin->_cnt;
!
! for (; ln > 0; ln--) {
(void) getchar();
}
}
*** message.c.orig Fri May 29 14:21:38 1987
--- message.c Fri Jun 12 13:21:44 1987
***************
*** 48,57 ****
msg_cleared = 0;
msg_col = strlen(msg);
if (did_int) {
onintr();
}
- cant_int = 0;
}
remessage()
--- 48,58 ----
msg_cleared = 0;
msg_col = strlen(msg);
+ cant_int = 0;
if (did_int) {
+ did_int = 0;
onintr();
}
}
remessage()
***************
*** 256,268 ****
save_screen()
{
FILE *fp;
! short i, j, row, col;
char buf[DCOLS+2];
boolean found_non_blank;
- row = curscr->_cury;
- col = curscr->_curx;
-
if ((fp = fopen("rogue.screen", "w")) != NULL) {
for (i = 0; i < DROWS; i++) {
found_non_blank = 0;
--- 257,266 ----
save_screen()
{
FILE *fp;
! short i, j;
char buf[DCOLS+2];
boolean found_non_blank;
if ((fp = fopen("rogue.screen", "w")) != NULL) {
for (i = 0; i < DROWS; i++) {
found_non_blank = 0;
***************
*** 282,289 ****
} else {
sound_bell();
}
- move(row, col);
- refresh();
}
sound_bell()
--- 280,285 ----
*** monster.c.orig Fri May 29 14:21:49 1987
--- monster.c Fri Jun 12 13:23:13 1987
***************
*** 16,22 ****
boolean mon_disappeared;
char *m_names[] = {
! "aquatar",
"bat",
"centaur",
"dragon",
--- 16,22 ----
boolean mon_disappeared;
char *m_names[] = {
! "aquator",
"bat",
"centaur",
"dragon",
***************
*** 32,38 ****
"nymph",
"orc",
"phantom",
! "quasit",
"rattlesnake",
"snake",
"troll",
--- 32,38 ----
"nymph",
"orc",
"phantom",
! "quagga",
"rattlesnake",
"snake",
"troll",
***************
*** 479,485 ****
}
if (dungeon[row][col] & OBJECT) {
obj = object_at(&level_objects, row, col);
! if ((obj->what_is == SCROLL) && (obj->which_kind == SCARE_MONSTER)) {
return(0);
}
}
--- 479,485 ----
}
if (dungeon[row][col] & OBJECT) {
obj = object_at(&level_objects, row, col);
! if ((obj->what_is == SCROL) && (obj->which_kind == SCARE_MONSTER)) {
return(0);
}
}
*** object.c.orig Fri May 29 14:22:10 1987
--- object.c Fri Jun 12 13:24:01 1987
***************
*** 50,56 ****
{145, "beige \0 ", "of see invisible ", 0}
};
! struct id id_scrolls[SCROLLS] = {
{505, " ", "of protect armor ", 0},
{200, " ", "of hold monster ", 0},
{235, " ", "of enchant weapon ", 0},
--- 50,56 ----
{145, "beige \0 ", "of see invisible ", 0}
};
! struct id id_scrolls[SCROLS] = {
{505, " ", "of protect armor ", 0},
{200, " ", "of hold monster ", 0},
{235, " ", "of enchant weapon ", 0},
***************
*** 244,250 ****
char *retstring;
switch(obj->what_is) {
! case SCROLL:
retstring = obj->quantity > 1 ? "scrolls " : "scroll ";
break;
case POTION:
--- 244,250 ----
char *retstring;
switch(obj->what_is) {
! case SCROL:
retstring = obj->quantity > 1 ? "scrolls " : "scroll ";
break;
case POTION:
***************
*** 308,314 ****
obj->what_is = gr_what_is();
}
switch(obj->what_is) {
! case SCROLL:
gr_scroll(obj);
break;
case POTION:
--- 308,314 ----
obj->what_is = gr_what_is();
}
switch(obj->what_is) {
! case SCROL:
gr_scroll(obj);
break;
case POTION:
***************
*** 342,348 ****
percent = get_rand(1, 91);
if (percent <= 30) {
! what_is = SCROLL;
} else if (percent <= 60) {
what_is = POTION;
} else if (percent <= 64) {
--- 342,348 ----
percent = get_rand(1, 91);
if (percent <= 30) {
! what_is = SCROL;
} else if (percent <= 60) {
what_is = POTION;
} else if (percent <= 64) {
***************
*** 366,372 ****
percent = get_rand(0, 85);
! obj->what_is = SCROLL;
if (percent <= 5) {
obj->which_kind = PROTECT_ARMOR;
--- 366,372 ----
percent = get_rand(0, 85);
! obj->what_is = SCROL;
if (percent <= 5) {
obj->which_kind = PROTECT_ARMOR;
***************
*** 694,701 ****
max = POTIONS - 1;
break;
case '?':
! obj->what_is = SCROLL;
! max = SCROLLS - 1;
break;
case ',':
obj->what_is = AMULET;
--- 694,701 ----
max = POTIONS - 1;
break;
case '?':
! obj->what_is = SCROL;
! max = SCROLS - 1;
break;
case ',':
obj->what_is = AMULET;
*** pack.c.orig Fri May 29 14:22:20 1987
--- pack.c Fri Jun 12 13:24:32 1987
***************
*** 60,66 ****
obj = object_at(&level_objects, row, col);
*status = 1;
! if ((obj->what_is == SCROLL) && (obj->which_kind == SCARE_MONSTER) &&
obj->picked_up) {
message("the scroll turns to dust as you pick it up", 0);
dungeon[row][col] &= (~OBJECT);
--- 60,66 ----
obj = object_at(&level_objects, row, col);
*status = 1;
! if ((obj->what_is == SCROL) && (obj->which_kind == SCARE_MONSTER) &&
obj->picked_up) {
message("the scroll turns to dust as you pick it up", 0);
dungeon[row][col] &= (~OBJECT);
***************
*** 157,163 ****
{
object *op;
! if (!(obj->what_is & (WEAPON | FOOD | SCROLL | POTION))) {
return(0);
}
if ((obj->what_is == FOOD) && (obj->which_kind == FRUIT)) {
--- 157,163 ----
{
object *op;
! if (!(obj->what_is & (WEAPON | FOOD | SCROL | POTION))) {
return(0);
}
if ((obj->what_is == FOOD) && (obj->which_kind == FRUIT)) {
***************
*** 380,386 ****
struct id *id_table;
char buf[MAX_TITLE_LENGTH+2];
! ch = pack_letter("call what?", (SCROLL | POTION | WAND | RING));
if (ch == CANCEL) {
return;
--- 380,386 ----
struct id *id_table;
char buf[MAX_TITLE_LENGTH+2];
! ch = pack_letter("call what?", (SCROL | POTION | WAND | RING));
if (ch == CANCEL) {
return;
***************
*** 389,395 ****
message("no such item.", 0);
return;
}
! if (!(obj->what_is & (SCROLL | POTION | WAND | RING))) {
message("surely you already know what that's called", 0);
return;
}
--- 389,395 ----
message("no such item.", 0);
return;
}
! if (!(obj->what_is & (SCROL | POTION | WAND | RING))) {
message("surely you already know what that's called", 0);
return;
}
***************
*** 450,456 ****
(*c == ')') || (*c == ']') || (*c == '/') || (*c == ','))) {
switch(*c) {
case '?':
! *mask = SCROLL;
break;
case '!':
*mask = POTION;
--- 450,456 ----
(*c == ')') || (*c == ']') || (*c == '/') || (*c == ','))) {
switch(*c) {
case '?':
! *mask = SCROL;
break;
case '!':
*mask = POTION;
*** patchlevel.h.orig Thu May 28 15:06:56 1987
--- patchlevel.h Fri Jun 12 13:24:41 1987
***************
*** 1 ****
! #define PATCHLEVEL 1
--- 1 ----
! #define PATCHLEVEL 2
*** rogue.h.orig Fri May 29 14:18:42 1987
--- rogue.h Fri Jun 12 13:25:27 1987
***************
*** 26,32 ****
#define ARMOR ((unsigned short) 01)
#define WEAPON ((unsigned short) 02)
! #define SCROLL ((unsigned short) 04)
#define POTION ((unsigned short) 010)
#define GOLD ((unsigned short) 020)
#define FOOD ((unsigned short) 040)
--- 26,32 ----
#define ARMOR ((unsigned short) 01)
#define WEAPON ((unsigned short) 02)
! #define SCROL ((unsigned short) 04)
#define POTION ((unsigned short) 010)
#define GOLD ((unsigned short) 020)
#define FOOD ((unsigned short) 040)
***************
*** 68,74 ****
#define CREATE_MONSTER 9
#define AGGRAVATE_MONSTER 10
#define MAGIC_MAPPING 11
! #define SCROLLS 12
#define INCREASE_STRENGTH 0
#define RESTORE_STRENGTH 1
--- 68,74 ----
#define CREATE_MONSTER 9
#define AGGRAVATE_MONSTER 10
#define MAGIC_MAPPING 11
! #define SCROLS 12
#define INCREASE_STRENGTH 0
#define RESTORE_STRENGTH 1
***************
*** 345,351 ****
#define QUIT 4
#define WIN 5
! #define UP 0
#define UPRIGHT 1
#define RIGHT 2
#define RIGHTDOWN 3
--- 345,351 ----
#define QUIT 4
#define WIN 5
! #define UPWARD 0
#define UPRIGHT 1
#define RIGHT 2
#define RIGHTDOWN 3
*** room.c.orig Fri May 29 14:22:54 1987
--- room.c Fri Jun 12 13:25:59 1987
***************
*** 140,146 ****
register unsigned short mask;
{
switch(mask) {
! case SCROLL:
return('?');
case POTION:
return('!');
--- 140,146 ----
register unsigned short mask;
{
switch(mask) {
! case SCROL:
return('?');
case POTION:
return('!');
***************
*** 404,410 ****
short d = -1;
if (*row == rooms[rn].top_row) {
! d = UP/2;
} else if (*row == rooms[rn].bottom_row) {
d = DOWN/2;
} else if (*col == rooms[rn].left_col) {
--- 404,410 ----
short d = -1;
if (*row == rooms[rn].top_row) {
! d = UPWARD/2;
} else if (*row == rooms[rn].bottom_row) {
d = DOWN/2;
} else if (*col == rooms[rn].left_col) {
*** save.c.orig Fri May 29 14:24:31 1987
--- save.c Fri Jun 12 13:26:27 1987
***************
*** 92,98 ****
r_write(fp, (char *) &rogue, sizeof(fighter));
write_pack(&rogue.pack, fp);
rw_id(id_potions, fp, POTIONS, 1);
! rw_id(id_scrolls, fp, SCROLLS, 1);
rw_id(id_wands, fp, WANDS, 1);
rw_id(id_rings, fp, RINGS, 1);
r_write(fp, (char *) traps, (MAX_TRAPS * sizeof(trap)));
--- 92,98 ----
r_write(fp, (char *) &rogue, sizeof(fighter));
write_pack(&rogue.pack, fp);
rw_id(id_potions, fp, POTIONS, 1);
! rw_id(id_scrolls, fp, SCROLS, 1);
rw_id(id_wands, fp, WANDS, 1);
rw_id(id_rings, fp, RINGS, 1);
r_write(fp, (char *) traps, (MAX_TRAPS * sizeof(trap)));
***************
*** 164,170 ****
r_read(fp, (char *) &rogue, sizeof(fighter));
read_pack(&rogue.pack, fp, 1);
rw_id(id_potions, fp, POTIONS, 0);
! rw_id(id_scrolls, fp, SCROLLS, 0);
rw_id(id_wands, fp, WANDS, 0);
rw_id(id_rings, fp, RINGS, 0);
r_read(fp, (char *) traps, (MAX_TRAPS * sizeof(trap)));
--- 164,170 ----
r_read(fp, (char *) &rogue, sizeof(fighter));
read_pack(&rogue.pack, fp, 1);
rw_id(id_potions, fp, POTIONS, 0);
! rw_id(id_scrolls, fp, SCROLS, 0);
rw_id(id_wands, fp, WANDS, 0);
rw_id(id_rings, fp, RINGS, 0);
r_read(fp, (char *) traps, (MAX_TRAPS * sizeof(trap)));
*** score.c.orig Fri May 29 14:25:01 1987
--- score.c Fri Jun 12 13:27:40 1987
***************
*** 120,127 ****
if (from_intrpt) {
! orow = curscr->_cury;
! ocol = curscr->_curx;
mc = msg_cleared;
for (i = 0; i < DCOLS; i++) {
--- 120,127 ----
if (from_intrpt) {
! orow = rogue.row;
! ocol = rogue.col;
mc = msg_cleared;
for (i = 0; i < DCOLS; i++) {
***************
*** 403,409 ****
case WAND:
val = id_wands[wc].value * (obj->class + 1);
break;
! case SCROLL:
val = id_scrolls[wc].value * obj->quantity;
break;
case POTION:
--- 403,409 ----
case WAND:
val = id_wands[wc].value * (obj->class + 1);
break;
! case SCROL:
val = id_scrolls[wc].value * obj->quantity;
break;
case POTION:
***************
*** 426,432 ****
{
short i;
! for (i = 0; i < SCROLLS; i++) {
id_scrolls[i].id_status = IDENTIFIED;
}
for (i = 0; i < WEAPONS; i++) {
--- 426,432 ----
{
short i;
! for (i = 0; i < SCROLS; i++) {
id_scrolls[i].id_status = IDENTIFIED;
}
for (i = 0; i < WEAPONS; i++) {
*** use.c.orig Fri May 29 14:25:52 1987
--- use.c Fri Jun 12 13:28:05 1987
***************
*** 148,154 ****
object *obj;
char msg[DCOLS];
! ch = pack_letter("read what?", SCROLL);
if (ch == CANCEL) {
return;
--- 148,154 ----
object *obj;
char msg[DCOLS];
! ch = pack_letter("read what?", SCROL);
if (ch == CANCEL) {
return;
***************
*** 157,163 ****
message("no such item.", 0);
return;
}
! if (obj->what_is != SCROLL) {
message("you can't read that", 0);
return;
}
--- 157,163 ----
message("no such item.", 0);
return;
}
! if (obj->what_is != SCROL) {
message("you can't read that", 0);
return;
}
***************
*** 336,342 ****
goto AGAIN;
}
obj->identified = 1;
! if (obj->what_is & (SCROLL | POTION | WEAPON | ARMOR | WAND | RING)) {
id_table = get_id_table(obj);
id_table[obj->which_kind].id_status = IDENTIFIED;
}
--- 336,342 ----
goto AGAIN;
}
obj->identified = 1;
! if (obj->what_is & (SCROL | POTION | WEAPON | ARMOR | WAND | RING)) {
id_table = get_id_table(obj);
id_table[obj->which_kind].id_status = IDENTIFIED;
}
*** zap.c.orig Fri May 29 14:26:04 1987
--- zap.c Fri Jun 12 13:29:07 1987
***************
*** 14,20 ****
boolean wizard = 0;
! extern boolean being_held, score_only;
zapp()
{
--- 14,20 ----
boolean wizard = 0;
! extern boolean being_held, score_only, detect_monster;
zapp()
{