|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: P T
Length: 14080 (0x3700) Types: TextFile Names: »Patches01«
└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987 └─⟦this⟧ »EUUGD18/General/Rogue_clone/Patches01«
*** Makefile.orig Mon May 11 12:10:18 1987 --- Makefile Thu May 28 15:24:33 1987 *************** *** 4,19 **** CC = cc ! # Remember to remove the "-lcurses -ltermlib" if compiling with -DCURSES. ! # Put into CFLAGS those UNIX "defines" which apply to your system. Their ! # should be at least two. ! # -DCURSES enables a self-contained curses emulation package. See notes ! # in curses.c for more info. ! CFLAGS = -c -DUNIX -DUNIX_BSD4_2 rogue: $(ROGUE_OBJS) ! $(CC) $(ROGUE_OBJS) -lcurses -ltermlib -o rogue curses.o: curses.c rogue.h $(CC) $(CFLAGS) curses.c --- 4,39 ---- CC = cc ! # Put into CFLAGS those UNIX "defines" which apply to your system. ! # ! # Options: ! # -DUNIX for all Unix based systems ! # -DUNIX_BSD4_2 for most BSD based Unix systems ! # -DUNIX_SYSV for System V based Unix systems ! # -DBAD_NONL for systems with the nonl() curses bug ! # -DCURSES enables a self-contained curses emulation package ! # Remember to remove the "-lcurses -ltermlib" ! # if compiling with -DCURSES. ! # -Ml compile with large model (SysV PC/AT's) ! CFLAGS = -c -DUNIX -DUNIX_BSD4_2 # BSD4.[23] ! #CFLAGS = -c -DUNIX -DUNIX_SYSV # Vanilla SysV ! #CFLAGS = -c -DUNIX -DUNIX_SYSV -DINT16 -Ml # Microport SysV, Rel2 for PC/AT + # Put into LDFLAGS those options which apply to your system. + # + # Options: + # -lcurses use standard curses package + # -ltermlib to extract terminal capabilities + # -Ml link with large model (SysV PC/AT's) + + LDFLAGS = -lcurses -ltermlib # Vanilla BSD and SysV + #LDFLAGS = -Ml -lcurses # Microport SysV, Rel2 for PC/AT + #LDFLAGS = # for use with self-contained curses + # package (-DCURSES) + rogue: $(ROGUE_OBJS) ! $(CC) $(ROGUE_OBJS) $(LDFLAGS) -o rogue curses.o: curses.c rogue.h $(CC) $(CFLAGS) curses.c *** rogue.h.orig Mon May 11 12:10:22 1987 --- rogue.h Fri May 29 14:18:42 1987 *************** *** 435,439 **** extern char *CL; char *md_gdtcf(); ! ! #endif CURSES --- 435,440 ---- extern char *CL; char *md_gdtcf(); ! #else ! #include <curses.h> ! #endif /* CURSES */ *** /dev/null Fri May 29 14:38:00 1987 --- patchlevel.h Thu May 28 15:06:56 1987 *************** *** 0 **** --- 1 ---- + #define PATCHLEVEL 1 *** curses.c.orig Mon May 11 12:10:43 1987 --- curses.c Fri May 29 14:19:41 1987 *************** *** 647,650 **** cm_end[j] = 0; } ! #endif CURSES --- 647,650 ---- cm_end[j] = 0; } ! #endif /* CURSES */ *** hit.c.orig Mon May 11 12:10:24 1987 --- hit.c Fri May 29 14:20:03 1987 *************** *** 10,18 **** * */ - #ifndef CURSES - #include <curses.h> - #endif CURSES #include "rogue.h" object *fight_monster = 0; --- 10,15 ---- *** init.c.orig Mon May 11 12:10:25 1987 --- init.c Fri May 29 14:20:21 1987 *************** *** 10,24 **** * */ - #ifndef CURSES - #include <curses.h> - #endif CURSES #include <stdio.h> #include "rogue.h" char login_name[30]; char *nick_name = ""; ! char *restore_file = 0; boolean cant_int = 0, did_int = 0, score_only, init_curses = 0; boolean save_is_interactive = 1; boolean ask_quit = 1, show_skull = 1; --- 10,21 ---- * */ #include <stdio.h> #include "rogue.h" char login_name[30]; char *nick_name = ""; ! char *rest_file = 0; boolean cant_int = 0, did_int = 0, score_only, init_curses = 0; boolean save_is_interactive = 1; boolean ask_quit = 1, show_skull = 1; *************** *** 46,52 **** } (void) strcpy(login_name, pn); ! if (!score_only && !restore_file) { printf("Hello %s, just a moment while I dig the dungeon...", ((nick_name[0]) ? nick_name : login_name)); fflush(stdout); --- 43,49 ---- } (void) strcpy(login_name, pn); ! if (!score_only && !rest_file) { printf("Hello %s, just a moment while I dig the dungeon...", ((nick_name[0]) ? nick_name : login_name)); fflush(stdout); *************** *** 66,73 **** } seed = md_gseed(); (void) srrandom(seed); ! if (restore_file) { ! restore(restore_file); return(1); } mix_colors(); --- 63,70 ---- } seed = md_gseed(); (void) srrandom(seed); ! if (rest_file) { ! restore(rest_file); return(1); } mix_colors(); *************** *** 148,154 **** --- 145,153 ---- { crmode(); noecho(); + #ifndef BAD_NONL nonl(); + #endif /* BAD_NONL */ md_control_keybord(0); } *************** *** 204,210 **** } } } else { ! restore_file = argv[i]; } } } --- 203,209 ---- } } } else { ! rest_file = argv[i]; } } } *** inventory.c.orig Mon May 11 12:10:28 1987 --- inventory.c Fri May 29 14:20:35 1987 *************** *** 10,18 **** * */ - #ifndef CURSES - #include <curses.h> - #endif CURSES #include "rogue.h" #define swap_string(x,y) {t = x; x = y; y = t;} --- 10,15 ---- *************** *** 165,171 **** move(0, 0); clrtoeol(); ! for (j = 1; j < i; j++) { mvaddstr(j, col, descs[j-1]); } } --- 162,168 ---- move(0, 0); clrtoeol(); ! for (j = 1; ((j < i) && (j < DROWS)); j++) { mvaddstr(j, col, descs[j-1]); } } *** level.c.orig Mon May 11 12:10:34 1987 --- level.c Fri May 29 14:20:48 1987 *************** *** 10,18 **** * */ - #ifndef CURSES - #include <curses.h> - #endif CURSES #include "rogue.h" #define swap(x,y) {t = x; x = y; y = t;} --- 10,15 ---- *************** *** 46,52 **** 99900000L }; ! char random_rooms[MAXROOMS+1] = "\003\007\005\002\010\006\001\004\0"; extern boolean being_held, wizard, detect_monster; extern boolean see_invisible; --- 43,49 ---- 99900000L }; ! short random_rooms[MAXROOMS] = {3, 7, 5, 2, 0, 6, 1, 4, 8}; extern boolean being_held, wizard, detect_monster; extern boolean see_invisible; *** message.c.orig Mon May 11 12:10:37 1987 --- message.c Fri May 29 14:21:38 1987 *************** *** 10,18 **** * */ - #ifndef CURSES - #include <curses.h> - #endif CURSES #include <stdio.h> #include "rogue.h" --- 10,15 ---- *************** *** 150,156 **** fflush(stdout); tstp(); break; ! #endif UNIX_BSD4_2 case 'X': save_screen(); break; --- 147,153 ---- fflush(stdout); tstp(); break; ! #endif /* UNIX_BSD4_2 */ case 'X': save_screen(); break; *************** *** 189,195 **** } mvaddstr(row, 10, "Gold: "); } ! sprintf(buf, "%d", rogue.gold); mvaddstr(row, 16, buf); pad(buf, 6); } --- 186,192 ---- } mvaddstr(row, 10, "Gold: "); } ! sprintf(buf, "%ld", rogue.gold); mvaddstr(row, 16, buf); pad(buf, 6); } *************** *** 234,240 **** mvaddstr(row, 56, "Exp: "); } /* Max exp taken care of in add_exp() */ ! sprintf(buf, "%d/%D", rogue.exp, rogue.exp_points); mvaddstr(row, 61, buf); pad(buf, 11); } --- 231,237 ---- mvaddstr(row, 56, "Exp: "); } /* Max exp taken care of in add_exp() */ ! sprintf(buf, "%d/%ld", rogue.exp, rogue.exp_points); mvaddstr(row, 61, buf); pad(buf, 11); } *** monster.c.orig Mon May 11 12:10:41 1987 --- monster.c Fri May 29 14:21:49 1987 *************** *** 10,18 **** * */ - #ifndef CURSES - #include <curses.h> - #endif CURSES #include "rogue.h" object level_monsters; --- 10,15 ---- *** move.c.orig Mon May 11 12:10:48 1987 --- move.c Fri May 29 14:22:01 1987 *************** *** 10,18 **** * */ - #ifndef CURSES - #include <curses.h> - #endif CURSES #include "rogue.h" short m_moves = 0; --- 10,15 ---- *************** *** 449,468 **** --- 446,473 ---- switch(d) { case 1: d = 'j'; + break; case 2: d = 'k'; + break; case 3: d = 'l'; + break; case 4: d = 'h'; + break; case 5: d = 'y'; + break; case 6: d = 'u'; + break; case 7: d = 'b'; + break; case 8: d = 'n'; + break; } return(d); } *** object.c.orig Mon May 11 12:11:06 1987 --- object.c Fri May 29 14:22:10 1987 *************** *** 10,18 **** * */ - #ifndef CURSES - #include <curses.h> - #endif CURSES #include "rogue.h" object level_objects; --- 10,15 ---- *************** *** 240,256 **** } } - free_free_list() - { - object *obj; - - while (free_list) { - obj = free_list; - free_list = free_list->next_object; - free_object(obj); - } - } - char * name_of(obj) object *obj; --- 237,242 ---- *************** *** 593,599 **** obj = free_list; free_list = free_list->next_object; } else if (!(obj = (object *) md_malloc(sizeof(object)))) { - free_free_list(); message("cannot allocate object, saving game", 0); save_into_file(error_file); } --- 579,584 ---- *** pack.c.orig Mon May 11 12:11:20 1987 --- pack.c Fri May 29 14:22:20 1987 *************** *** 10,18 **** * */ - #ifndef CURSES - #include <curses.h> - #endif CURSES #include "rogue.h" char *curse_message = "you can't, it appears to be cursed"; --- 10,15 ---- *************** *** 486,489 **** --- 483,515 ---- has_amulet() { return(mask_pack(&rogue.pack, AMULET)); + } + + kick_into_pack() + { + object *obj; + char desc[DCOLS]; + short n, stat; + + if (!(dungeon[rogue.row][rogue.col] & OBJECT)) { + message("nothing here", 0); + } else { + if (obj = pick_up(rogue.row, rogue.col, &stat)) { + get_desc(obj, desc); + if (obj->what_is == GOLD) { + message(desc, 0); + free_object(obj); + } else { + n = strlen(desc); + desc[n] = '('; + desc[n+1] = obj->ichar; + desc[n+2] = ')'; + desc[n+3] = 0; + message(desc, 0); + } + } + if (obj || (!stat)) { + (void) reg_move(); + } + } } *** play.c.orig Mon May 11 12:11:23 1987 --- play.c Fri May 29 14:22:29 1987 *************** *** 10,18 **** * */ - #ifndef CURSES - #include <curses.h> - #endif CURSES #include "rogue.h" boolean interrupted = 0; --- 10,15 ---- *************** *** 232,237 **** --- 229,237 ---- break; case 'S': save_game(); + break; + case ',': + kick_into_pack(); break; default: message(unknown_command, 0); *** random.c.orig Mon May 11 12:11:32 1987 --- random.c Thu May 28 15:04:24 1987 *************** *** 61,74 **** register int x, y; { register int r, t; ! if (x > y) { t = y; y = x; x = t; } ! r = (int) rrandom(); ! r = (r % ((y-x)+1)) + x; return(r); } --- 61,77 ---- register int x, y; { register int r, t; ! long lr; ! if (x > y) { t = y; y = x; x = t; } ! lr = rrandom(); ! lr &= (long) 0x00007fff; ! r = (int) lr; ! r = (r % ((y - x) + 1)) + x; return(r); } *** room.c.orig Mon May 11 12:11:37 1987 --- room.c Fri May 29 14:22:54 1987 *************** *** 10,18 **** * */ - #ifndef CURSES - #include <curses.h> - #endif CURSES #include "rogue.h" room rooms[MAXROOMS]; --- 10,15 ---- *** save.c.orig Mon May 11 12:11:40 1987 --- save.c Fri May 29 14:24:31 1987 *************** *** 10,18 **** * */ - #ifndef CURSES - #include <curses.h> - #endif CURSES #include <stdio.h> #include "rogue.h" --- 10,15 ---- *** score.c.orig Mon May 11 12:11:46 1987 --- score.c Fri May 29 14:25:01 1987 *************** *** 10,18 **** * */ - #ifndef CURSES - #include <curses.h> - #endif CURSES #include <stdio.h> #include "rogue.h" --- 10,15 ---- *************** *** 61,67 **** (void) strcat(buf, m_names[monster->m_char - 'A']); } (void) strcat(buf, " with "); ! sprintf(buf+strlen(buf), "%d gold", rogue.gold); if ((!other) && show_skull) { clear(); mvaddstr(4, 32, "__---------__"); --- 58,64 ---- (void) strcat(buf, m_names[monster->m_char - 'A']); } (void) strcat(buf, " with "); ! sprintf(buf+strlen(buf), "%ld gold", rogue.gold); if ((!other) && show_skull) { clear(); mvaddstr(4, 32, "__---------__"); *************** *** 414,419 **** --- 411,419 ---- break; case AMULET: val = 5000; + break; + case RING: + val = id_rings[wc].value * (obj->class + 1); break; } if (val <= 0) { *** spec_hit.c.orig Mon May 11 12:10:52 1987 --- spec_hit.c Fri May 29 14:25:11 1987 *************** *** 10,18 **** * */ - #ifndef CURSES - #include <curses.h> - #endif CURSES #include "rogue.h" short less_hp = 0; --- 10,15 ---- *** throw.c.orig Mon May 11 12:11:50 1987 --- throw.c Fri May 29 14:25:22 1987 *************** *** 10,18 **** * */ - #ifndef CURSES - #include <curses.h> - #endif CURSES #include "rogue.h" extern short cur_room; --- 10,15 ---- *** trap.c.orig Mon May 11 12:11:53 1987 --- trap.c Fri May 29 14:25:42 1987 *************** *** 10,18 **** * */ - #ifndef CURSES - #include <curses.h> - #endif CURSES #include "rogue.h" trap traps[MAX_TRAPS]; --- 10,15 ---- *** use.c.orig Mon May 11 12:11:31 1987 --- use.c Fri May 29 14:25:52 1987 *************** *** 10,18 **** * */ - #ifndef CURSES - #include <curses.h> - #endif CURSES #include "rogue.h" short halluc = 0; --- 10,15 ---- *** zap.c.orig Mon May 11 12:11:55 1987 --- zap.c Fri May 29 14:26:04 1987 *************** *** 10,18 **** * */ - #ifndef CURSES - #include <curses.h> - #endif CURSES #include "rogue.h" boolean wizard = 0; --- 10,15 ---- *************** *** 173,183 **** being_held = 0; } gr_row_col(&row, &col, (FLOOR | TUNNEL | STAIRS | OBJECT)); dungeon[monster->row][monster->col] &= ~MONSTER; - monster->row = row; monster->col = col; dungeon[row][col] |= MONSTER; monster->trail_char = mvinch(row, col); } wizardize() --- 170,183 ---- being_held = 0; } gr_row_col(&row, &col, (FLOOR | TUNNEL | STAIRS | OBJECT)); + mvaddch(monster->row, monster->col, monster->trail_char); dungeon[monster->row][monster->col] &= ~MONSTER; monster->row = row; monster->col = col; dungeon[row][col] |= MONSTER; monster->trail_char = mvinch(row, col); + if (detect_monster || rogue_can_see(row, col)) { + mvaddch(row, col, gmc(monster)); + } } wizardize()