games@tekred.TEK.COM (07/27/88)
Submitted by: "James E. Wilson" <wilson@ji.berkeley.edu> Comp.sources.games: Volume 5, Issue 35 Archive-name: umoria2/Part04 #! /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 4 (of 18)." # Contents: Highscores Xenix.patch wands.c # Wrapped by billr@saab on Wed Jul 13 11:16:21 1988 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'Highscores' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Highscores'\" else echo shar: Extracting \"'Highscores'\" \(0 characters\) sed "s/^X//" >'Highscores' <<'END_OF_FILE' END_OF_FILE if test 0 -ne `wc -c <'Highscores'`; then echo shar: \"'Highscores'\" unpacked with wrong size! fi # end of 'Highscores' fi if test -f 'Xenix.patch' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Xenix.patch'\" else echo shar: Extracting \"'Xenix.patch'\" \(49819 characters\) sed "s/^X//" >'Xenix.patch' <<'END_OF_FILE' X XThis (obsolete) XENIX patch is for umoria 4.85. It is not guaranteed to work Xfor umoria 4.87, but should provide a good starting point. X XYou will probably have better luck if you use the Int16bit.patch file first, Xand then reference this file if you still have problems. X XJim Wilson Xwilson@ji.Berkeley.EDU X X XFrom ucbvax!agate!ig!uwmcsd1!leah!itsgw!batcomputer!cornell!rochester!ur-tut!sunybcs!boulder!hao!oddjob!gargoyle!jpusa1!news Thu Jan 21 12:54:27 PST 1988 XStatus: RO X XArticle 725 of comp.sources.bugs: XPath: ucbvax!agate!ig!uwmcsd1!leah!itsgw!batcomputer!cornell!rochester!ur-tut!sunybcs!boulder!hao!oddjob!gargoyle!jpusa1!news X>From: news@jpusa1.UUCP (usenet) XNewsgroups: comp.sources.bugs,rec.games.moria XSubject: xenix moria again XMessage-ID: <661@jpusa1.UUCP> XDate: 21 Jan 88 07:43:08 GMT XReply-To: stu@jpusa1.UUCP (Stu Heiss) XOrganization: JPUSA - Chicago, IL XLines: 13 XXref: ucbvax comp.sources.bugs:725 rec.games.moria:180 X XOne detail I forgot concerning the patch I posted for moria to Xrun on xenix is potential problems with ld. If you have the X2.2 os update, your ld is broken. I never noticed any trouble Xunitil I ported moria to xenix but there is a known (to sco) bug Xin the ld that comes with the 2.2 update. You do need this ld Xto link the kernel, but get out the ld that comes with 2.1.4 Xto link moria. btw, I'm still trying to get nethack to link Xproperly, although it is very low on the priority list just now. XIf anyone has managed to come up with a workaround, I'd like Xto hear from you. If your nethack cordumps when you select 'W' Xfor wizard, you have the same problem I do. X-- XStu Heiss {gargoyle,ihnp4}!jpusa1!stu X X XFrom ucbvax!decvax!tektronix!tekgen!tekred!games-request Thu Jan 21 12:53:35 PST 1988 XStatus: RO X XArticle 263 of comp.sources.games: XPath: ucbvax!decvax!tektronix!tekgen!tekred!games-request X>From: games-request@tekred.TEK.COM XNewsgroups: comp.sources.games XSubject: v03i064: umoria - diffs for Xenix V XMessage-ID: <2088@tekred.TEK.COM> XDate: 20 Jan 88 18:35:15 GMT XSender: billr@tekred.TEK.COM XLines: 1746 XApproved: billr@tekred.TEK.COM X XSubmitted by: jpusa1!stu@ihnp4 (Stu Heiss) XComp.sources.games: Volume 3, Issue 64 XArchive-name: umoria/xenix_diff X X [Here are diffs to get umoria running on Xenix and other X 'sizeof int = 16' os'es. This is being posted here at X the request of the submitter so it can be part of the X archive (he also posted this to comp.sources.bugs). -br] X X#! /bin/sh X# This is a shell archive. Remove anything before this line, then unpack X# it by saving it into a file and typing "sh file". To overwrite existing X# files, type "sh file -c". You can also feed this as standard input via X# unshar, or by typing "sh <file", e.g.. If this archive is complete, you X# will see the following message at the end: X# "End of shell archive." X# Contents: Makefile clashes.h diffs.xenix X# Wrapped by billr@tekred on Wed Jan 20 10:33:20 1988 XPATH=/bin:/usr/bin:/usr/ucb ; export PATH Xif test -f Makefile -a "${1}" != "-c" ; then X echo shar: Will not over-write existing file \"Makefile\" Xelse Xecho shar: Extracting \"Makefile\" \(3830 characters\) Xsed "s/^X//" >Makefile <<'END_OF_Makefile' XX# BINDIR is the directory where the moria binary while be put XX# LIBDIR is where the other files (scoreboard, news, hours) will be put XX# LIBDIR must be the same directory defined in config.h XXBINDIR = /usr/local/games XXLIBDIR = /usr/local/lib/moria XX XXDEFS = -DXENIX -DUSG -DKEY_BINDINGS=ROGUE_LIKE -DBUGGY_CURSES XXOPTIM= # -O XXMODEL= -Mel2 XXCFLAGS = $(MODEL) $(OPTIM) $(DEFS) XXLDFLAGS = $(MODEL) -F 4000 XXCC=cc XXCCL=cc -LARGE XXSEG= # -SEG 1000 XXLIBS= -lm -lcurses -ltermcap XX#LIBS= -lm -lcurses -ltermcap -lx XX XXSRCS = main.c misc1.c misc2.c store1.c files.c io.c create.c desc.c\ XX generate.c sets.c dungeon.c creature.c death.c eat.c help.c magic.c\ XX potions.c prayer.c save.c staffs.c wands.c scrolls.c spells.c\ XX wizard.c store2.c signals.c moria1.c moria2.c monsters.c\ XX treasure1.c treasure2.c variables.c XX XXxOBJS = main.o misc1.o misc2.o store1.o files1.o files2.o io.o create1.o create2.o desc.o\ XX generate.o sets.o dungeon.o creature.o death.o eat.o help.o magic.o\ XX potions.o prayer.o save.o staffs.o wands.o scrolls.o spells.o\ XX wizard1.o wizard2.o store2.o signals.o moria1.o moria2.o monsters.o\ XX treasure1.o treasure2.o variables.o XX XXdOBJS = monsters.o treasure1.o treasure2.o variables.o XX XXcOBJS = main.o misc1.o misc2.o store1.o files1.o files2.o io.o create1.o create2.o desc.o\ XX generate.o sets.o dungeon.o creature.o death.o eat.o help.o magic.o\ XX potions.o prayer.o save.o staffs.o wands.o scrolls.o spells.o\ XX wizard1.o wizard2.o store2.o signals.o moria1.o moria2.o XX XX#OBJS= /lib/Lsignal.o $(dOBJS) $(cOBJS) XXOBJS= $(xOBJS) XX XXmoria : $(OBJS) XX $(CC) -o moria $(LDFLAGS) $(OBJS) $(SEG) $(LIBS) XX XXmonsters.o: monsters.c XX $(CC) $(CFLAGS) -ND monsters -c monsters.c XX XXtreasure1.o: treasure1.c XX $(CC) $(CFLAGS) -ND treasure1 -c treasure1.c XX XXtreasure2.o: treasure2.c XX $(CC) $(CFLAGS) -ND treasure2 -c treasure2.c XX XXvariables.o: variables.c XX $(CC) $(CFLAGS) -ND variables -c variables.c XX XXmisc1.o: misc1.c XX $(CCL) $(CFLAGS) -c misc1.c XX XXfiles1.o: files.c XX cc $(CFLAGS) -c -DPASS1 files.c XX mv files.o files1.o XX XXfiles2.o: files.c XX cc $(CFLAGS) -c files.c XX mv files.o files2.o XX XXcreate1.o: create.c XX cc $(CFLAGS) -c -DPASS1 create.c XX mv create.o create1.o XX XXcreate2.o: create.c XX cc $(CFLAGS) -c create.c XX mv create.o create2.o XX XXwizard1.o: wizard.c XX cc $(CFLAGS) -c -DPASS1 wizard.c XX mv wizard.o wizard1.o XX XXwizard2.o: wizard.c XX cc $(CFLAGS) -c wizard.c XX mv wizard.o wizard2.o XX XXlintout : $(SRCS) XX lint -DUSG $(SRCS) -lm -lcurses -ltermcap > lintout XX XXTAGS : $(SRCS) XX ctags -x $(SRCS) > TAGS XX XXinstall: XX cp moria $(BINDIR) XX cp Moria_hours $(LIBDIR) XX cp Moria_news $(LIBDIR) XX cp Highscores $(LIBDIR) XX chmod 4511 $(BINDIR)/moria XX chmod 644 $(LIBDIR)/Highscores XX chmod 444 $(LIBDIR)/Moria_news XX chmod 444 $(LIBDIR)/Moria_hours XX chmod 555 $(LIBDIR) XX XXcreate.o: constants.h types.h externs.h XXcreature.o: constants.h types.h externs.h XXdeath.o: config.h constants.h types.h externs.h XXdesc.o: constants.h types.h externs.h XXdungeon.o: constants.h types.h externs.h XXeat.o: constants.h types.h externs.h XXfiles.o: config.h constants.h types.h externs.h XXgenerate.o: constants.h types.h externs.h XXhelp.o: constants.h types.h externs.h XXio.o: constants.h types.h externs.h XXmagic.o: constants.h types.h externs.h XXmain.o: constants.h types.h XXmisc1.o: constants.h types.h externs.h XXmisc2.o: config.h constants.h types.h externs.h XXmoria1.o: constants.h types.h externs.h XXmoria2.o: constants.h types.h externs.h XXpotions.o: constants.h types.h externs.h XXprayer.o: constants.h types.h externs.h XXsave.o: constants.h types.h externs.h XXscrolls.o: constants.h types.h externs.h XXsets.o: constants.h XXsignals.o: constants.h types.h externs.h XXspells.o: constants.h types.h externs.h XXstaffs.o: constants.h types.h externs.h XXstore1.o: constants.h types.h externs.h XXstore2.o: constants.h types.h externs.h XXwands.o: constants.h types.h externs.h XXwizard.o: constants.h types.h externs.h XEND_OF_Makefile Xif test 3830 -ne `wc -c <Makefile`; then X echo shar: \"Makefile\" unpacked with wrong size! Xfi X# end of overwriting check Xfi Xif test -f clashes.h -a "${1}" != "-c" ; then X echo shar: Will not over-write existing file \"clashes.h\" Xelse Xecho shar: Extracting \"clashes.h\" \(4801 characters\) Xsed "s/^X//" >clashes.h <<'END_OF_clashes.h' XX#define aggravate_monster _fix0 XX#define background_type _fix1 XX#define build_type1 _fix2 XX#define build_type2 _fix3 XX#define build_type3 _fix4 XX#define change_name _fix5 XX#define change_speed _fix6 XX#define change_stat_factor _fix7 XX#define char_tmp _fix8 XX#define compact_monsters _fix9 XX#define confuse _fix10 XX#define confuse_monster _fix11 XX#define confused _fix12 XX#define corr_floor1 _fix13 XX#define corr_floor2 _fix14 XX#define corr_floor3 _fix15 XX#define creature_type _fix16 XX#define creatures _fix17 XX#define critical_blow _fix18 XX#define cur_char1 _fix19 XX#define de_statp _fix20 XX#define delete_1 _fix21 XX#define delete_monster _fix22 XX#define delete_object _fix23 XX#define destroy _fix24 XX#define destroy2 _fix25 XX#define detect_evil _fix26 XX#define detect_inv2 _fix27 XX#define detect_invisible _fix28 XX#define detect_monsters _fix29 XX#define detect_object _fix30 XX#define detect_sdoor _fix31 XX#define detect_trap _fix32 XX#define detect_treasure _fix33 XX#define display_commands _fix34 XX#define display_cost _fix35 XX#define display_inventory _fix36 XX#define generate _fix37 XX#define haggle_commands _fix38 XX#define haggle_insults _fix39 XX#define history _fix40 XX#define in_statp _fix41 XX#define increase_insults _fix42 XX#define insert_inv _fix43 XX#define insert_str _fix44 XX#define insult_cur _fix45 XX#define insult_max _fix46 XX#define inven_carry _fix47 XX#define inven_check_num _fix48 XX#define inven_check_weight _fix49 XX#define inven_ctr _fix50 XX#define inven_destroy _fix51 XX#define inven_drop _fix52 XX#define inventory _fix53 XX#define item_value _fix54 XX#define magic_spell _fix55 XX#define max_panel_rows _fix56 XX#define monster_death _fix57 XX#define monster_type _fix58 XX#define new_spells _fix59 XX#define next_to _fix60 XX#define next_to4 _fix61 XX#define object_ident _fix62 XX#define object_list _fix63 XX#define object_str _fix64 XX#define old_ptodam _fix65 XX#define original_commands _fix66 XX#define original_help _fix67 XX#define out_val _fix68 XX#define out_val1 _fix69 XX#define out_val2 _fix70 XX#define panel_col _fix71 XX#define panel_col_max _fix72 XX#define panel_col_min _fix73 XX#define panel_col_prt _fix74 XX#define panel_row _fix75 XX#define panel_row_max _fix76 XX#define panel_row_min _fix77 XX#define password1 _fix78 XX#define place_door _fix79 XX#define place_down_stairs _fix80 XX#define place_open_door _fix81 XX#define place_secret_door _fix82 XX#define place_streamer _fix83 XX#define place_stuck_door _fix84 XX#define player_exp _fix85 XX#define player_light _fix86 XX#define player_max_exp _fix87 XX#define player_saves _fix88 XX#define player_title _fix89 XX#define player_type _fix90 XX#define print_map _fix91 XX#define prt_comment1 _fix92 XX#define prt_comment2 _fix93 XX#define prt_comment3 _fix94 XX#define prt_comment4 _fix95 XX#define prt_comment5 _fix96 XX#define prt_constitution _fix97 XX#define prt_stat _fix98 XX#define purchase_haggle _fix99 XX#define put_misc1 _fix100 XX#define put_misc2 _fix101 XX#define randes_state _fix102 XX#define receive_offer _fix103 XX#define remove_curse _fix104 XX#define remove_fear _fix105 XX#define resist_heat _fix106 XX#define restore_level _fix107 XX#define rock_wall1 _fix108 XX#define rock_wall2 _fix109 XX#define rock_wall3 _fix110 XX#define rogue_like_commands _fix111 XX#define rogue_like_help _fix112 XX#define search_flag _fix113 XX#define search_off _fix114 XX#define search_on _fix115 XX#define set_1_2 _fix116 XX#define set_acid_affect _fix117 XX#define set_corrodes _fix118 XX#define set_lightning_destroy _fix119 XX#define signal_save_core _fix120 XX#define signal_save_no_core _fix121 XX#define sleep_monster _fix122 XX#define sleep_monsters1 _fix123 XX#define speed_monster _fix124 XX#define store_carry _fix125 XX#define store_check _fix126 XX#define store_check_num _fix127 XX#define store_create _fix128 XX#define store_ctr _fix129 XX#define store_inven _fix130 XX#define store_prt_gold _fix131 XX#define summon_monster _fix132 XX#define sustain_con _fix133 XX#define sustain_dex _fix134 XX#define sustain_int _fix135 XX#define sustain_str _fix136 XX#define sustain_wis _fix137 XX#define td_destroy _fix138 XX#define teleport _fix139 XX#define teleport_away _fix140 XX#define teleport_flag _fix141 XX#define teleport_monster _fix142 XX#define teleport_to _fix143 XX#define trap_lista _fix144 XX#define turn_undead _fix145 XX#define unlight_area _fix146 XX#define weight_limit _fix147 XX#define wizard_light _fix148 XX#define cbreak crmode XX#define nocbreak nocrmode XX#define saveterm savetty XX#define resetterm resetty XX#define change_character _fix149 XX#define change_stat _fix150 XX#define change_trap _fix151 XX#define create_character _fix152 XX#define create_food _fix153 XX#define disarm_all _fix154 XX#define disarm_trap _fix155 XX#define display_char _fix156 XX#define display_scores _fix157 XX#define display_store _fix158 XX#define insert_num _fix159 XX#define insert_store _fix160 XX#define place_boundary _fix161 XX#define place_broken_door _fix162 XX#define store_destroy _fix163 XX#define summon_object _fix164 XX#define summon_undead _fix165 XEND_OF_clashes.h Xif test 4801 -ne `wc -c <clashes.h`; then X echo shar: \"clashes.h\" unpacked with wrong size! Xfi X# end of overwriting check Xfi Xif test -f diffs.xenix -a "${1}" != "-c" ; then X echo shar: Will not over-write existing file \"diffs.xenix\" Xelse Xecho shar: Extracting \"diffs.xenix\" \(35406 characters\) Xsed "s/^X//" >diffs.xenix <<'END_OF_diffs.xenix' XXIndex: constants.h XXRCS file: RCS/constants.h,v XXretrieving revision 1.1 XXdiff -c3 -r1.1 constants.h XX*** /tmp/,RCSt1a02655 Mon Jan 18 10:27:46 1988 XX--- constants.h Sun Dec 6 14:54:41 1987 XX*************** XX*** 1,3 XX /*Note to the Wizard: */ XX /* Tweaking these constants can *GREATLY* change the game. */ XX /* Two years of constant tuning have generated these */ XX XX--- 1,4 ----- XX+ #include "clashes.h" XX /*Note to the Wizard: */ XX /* Tweaking these constants can *GREATLY* change the game. */ XX /* Two years of constant tuning have generated these */ XXIndex: create.c XXRCS file: RCS/create.c,v XXretrieving revision 1.1 XXdiff -c3 -r1.1 create.c XX*** /tmp/,RCSt1a02660 Mon Jan 18 10:27:55 1988 XX--- create.c Mon Dec 7 16:40:40 1987 XX*************** XX*** 13,18 XX char *sprintf(); XX #endif XX XX /* Generates character's stats -JWT- */ XX int get_stat() XX { XX XX--- 13,19 ----- XX char *sprintf(); XX #endif XX XX+ #ifdef PASS1 XX /* Generates character's stats -JWT- */ XX int get_stat() XX { XX*************** XX*** 39,44 XX return(cur_stat); XX } XX XX XX /* Allows player to select a race -JWT- */ XX int choose_race() XX XX--- 40,46 ----- XX return(cur_stat); XX } XX XX+ #else /* PASS1 */ XX XX /* Allows player to select a race -JWT- */ XX int choose_race() XX*************** XX*** 305,311 XX prt("Choose a class (? for Help):", 20, 2); XX do XX { XX! if (race[i].tclass & bit_array[j]) XX { XX (void) sprintf(tmp_str, "%c) %s", k+97, class[j].title); XX put_buffer(tmp_str, m, l); XX XX--- 307,313 ----- XX prt("Choose a class (? for Help):", 20, 2); XX do XX { XX! if (race[i].rtclass & bit_array[j]) XX { XX (void) sprintf(tmp_str, "%c) %s", k+97, class[j].title); XX put_buffer(tmp_str, m, l); XX*************** XX*** 437,439 XX pause_exit(23, PLAYER_EXIT_PAUSE); XX } XX XX XX--- 439,442 ----- XX pause_exit(23, PLAYER_EXIT_PAUSE); XX } XX XX+ #endif /* PASS1 */ XXIndex: creature.c XXRCS file: RCS/creature.c,v XXretrieving revision 1.1 XXdiff -c3 -r1.1 creature.c XX*** /tmp/,RCSt1a02665 Mon Jan 18 10:28:08 1988 XX--- creature.c Wed Dec 9 11:52:05 1987 XX*************** XX*** 663,668 XX prt_chp(); XX break; XX case 19: /*Lose experience */ XX msg_print("You feel your life draining away!"); XX i = damroll(damstr) + (py.misc.exp / 100)*MON_DRAIN_LIFE; XX lose_exp(i); XX XX--- 663,670 ----- XX prt_chp(); XX break; XX case 19: /*Lose experience */ XX+ { XX+ bigint_t m; XX msg_print("You feel your life draining away!"); XX m = damroll(damstr) + (py.misc.exp / 100)*MON_DRAIN_LIFE; XX lose_exp(m); XX*************** XX*** 664,671 XX break; XX case 19: /*Lose experience */ XX msg_print("You feel your life draining away!"); XX! i = damroll(damstr) + (py.misc.exp / 100)*MON_DRAIN_LIFE; XX! lose_exp(i); XX break; XX case 20: /*Aggravate monster*/ XX (void) aggravate_monster(5); XX XX--- 666,673 ----- XX { XX bigint_t m; XX msg_print("You feel your life draining away!"); XX! m = damroll(damstr) + (py.misc.exp / 100)*MON_DRAIN_LIFE; XX! lose_exp(m); XX break; XX } XX case 20: /*Aggravate monster*/ XX*************** XX*** 667,672 XX i = damroll(damstr) + (py.misc.exp / 100)*MON_DRAIN_LIFE; XX lose_exp(i); XX break; XX case 20: /*Aggravate monster*/ XX (void) aggravate_monster(5); XX break; XX XX--- 669,675 ----- XX m = damroll(damstr) + (py.misc.exp / 100)*MON_DRAIN_LIFE; XX lose_exp(m); XX break; XX+ } XX case 20: /*Aggravate monster*/ XX (void) aggravate_monster(5); XX break; XX*************** XX*** 752,758 XX int *mm; XX { XX int i, j, newy, newx; XX! unsigned int movebits; XX int flag, tflag; XX int res; XX cave_type *c_ptr; XX XX--- 755,761 ----- XX int *mm; XX { XX int i, j, newy, newx; XX! bitset_t movebits; XX int flag, tflag; XX int res; XX cave_type *c_ptr; XX*************** XX*** 953,959 XX int monptr; XX int *took_turn; XX { XX! unsigned int i; XX int j, k, y, x; XX int chance, thrown_spell; XX double r1; XX XX--- 956,962 ----- XX int monptr; XX int *took_turn; XX { XX! bitset_t i; XX int j, k, y, x; XX int chance, thrown_spell; XX double r1; XXIndex: death.c XXRCS file: RCS/death.c,v XXretrieving revision 1.1 XXdiff -c3 -r1.1 death.c XX*** /tmp/,RCSt1a02670 Mon Jan 18 10:28:20 1988 XX--- death.c Mon Dec 7 16:52:51 1987 XX*************** XX*** 174,180 XX (void) strcpy(str3, fill_str(py.misc.tclass)); XX (void) sprintf(str4, "Level : %d", (int)py.misc.lev); XX (void) strcpy(str4, fill_str(str4)); XX! (void) sprintf(str5, "%d Exp", py.misc.exp); XX (void) strcpy(str5, fill_str(str5)); XX (void) sprintf(str6, "%d Au", py.misc.au); XX (void) strcpy(str6, fill_str(str6)); XX XX--- 174,180 ----- XX (void) strcpy(str3, fill_str(py.misc.tclass)); XX (void) sprintf(str4, "Level : %d", (int)py.misc.lev); XX (void) strcpy(str4, fill_str(str4)); XX! (void) sprintf(str5, "%ld Exp", (long)py.misc.exp); XX (void) strcpy(str5, fill_str(str5)); XX (void) sprintf(str6, "%d Au", py.misc.au); XX (void) strcpy(str6, fill_str(str6)); XX*************** XX*** 248,254 XX XX XX /* Calculates the total number of points earned -JWT- */ XX! int total_points() XX { XX return (py.misc.max_exp + (100 * py.misc.max_lev)); XX } XX XX--- 248,254 ----- XX XX XX /* Calculates the total number of points earned -JWT- */ XX! long total_points() XX { XX return (py.misc.max_exp + (100 * py.misc.max_lev)); XX } XX*************** XX*** 265,271 XX exit_game(); XX clear_screen(0, 0); XX XX! myscore.points = (long)total_points(); XX myscore.dun_level = dun_level; XX myscore.lev = py.misc.lev; XX myscore.max_lev = py.misc.max_lev; XX XX--- 265,271 ----- XX exit_game(); XX clear_screen(0, 0); XX XX! myscore.points = total_points(); XX myscore.dun_level = dun_level; XX myscore.lev = py.misc.lev; XX myscore.max_lev = py.misc.max_lev; XXIndex: eat.c XXRCS file: RCS/eat.c,v XXretrieving revision 1.1 XXdiff -c3 -r1.1 eat.c XX*** /tmp/,RCSt1a02675 Mon Jan 18 10:28:28 1988 XX--- eat.c Wed Dec 9 11:53:34 1987 XX*************** XX*** 6,12 XX /* Eat some food... -RAK- */ XX eat() XX { XX! unsigned int i; XX int j, k, item_val; XX int redraw, ident; XX struct flags *f_ptr; XX XX--- 6,12 ----- XX /* Eat some food... -RAK- */ XX eat() XX { XX! bitset_t i; XX int j, k, item_val; XX int redraw, ident; XX struct flags *f_ptr; XXIndex: externs.h XXRCS file: RCS/externs.h,v XXretrieving revision 1.1 XXdiff -c3 -r1.1 externs.h XX*** /tmp/,RCSt1a02680 Mon Jan 18 10:28:35 1988 XX--- externs.h Wed Dec 9 11:42:38 1987 XX*************** XX*** 1,6 XX extern int character_generated; /* don't save score until char gen finished */ XX extern int highscore_fd; /* High score file descriptor */ XX! extern int player_max_exp; /* Max exp possible */ XX extern char norm_state[STATE_SIZE]; /* Contains seed # */ XX extern char randes_state[STATE_SIZE]; XX extern int randes_seed; /* For encoding colors */ XX XX--- 1,6 ----- XX extern int character_generated; /* don't save score until char gen finished */ XX extern int highscore_fd; /* High score file descriptor */ XX! extern bigint_t player_max_exp; /* Max exp possible */ XX extern char norm_state[STATE_SIZE]; /* Contains seed # */ XX extern char randes_state[STATE_SIZE]; XX extern int randes_seed; /* For encoding colors */ XX*************** XX*** 32,38 XX extern int closing_flag; /* Used for closing */ XX XX /* Bit testing array */ XX! extern unsigned int bit_array[32]; XX XX /* Following are calculated from max dungeon sizes */ XX extern int max_panel_rows, max_panel_cols; XX XX--- 32,38 ----- XX extern int closing_flag; /* Used for closing */ XX XX /* Bit testing array */ XX! extern bitset_t bit_array[32]; XX XX /* Following are calculated from max dungeon sizes */ XX extern int max_panel_rows, max_panel_cols; XX*************** XX*** 43,49 XX extern int panel_col_prt, panel_row_prt; XX XX /* Following are all floor definitions */ XX! extern cave_type cave[MAX_HEIGHT][MAX_WIDTH]; XX extern cave_type blank_floor; XX extern floor_type dopen_floor; XX extern floor_type lopen_floor; XX XX--- 43,49 ----- XX extern int panel_col_prt, panel_row_prt; XX XX /* Following are all floor definitions */ XX! extern cave_type huge cave[MAX_HEIGHT][MAX_WIDTH]; XX extern cave_type blank_floor; XX extern floor_type dopen_floor; XX extern floor_type lopen_floor; XX*************** XX*** 59,65 XX /* Following are player variables */ XX extern player_type py; XX extern btype player_title[MAX_CLASS][MAX_PLAYER_LEVEL]; XX! extern int player_exp[MAX_PLAYER_LEVEL]; XX extern double acc_exp; /* Accumulator for fractional exp*/ XX extern dtype bare_hands; XX extern int char_row; XX XX--- 59,65 ----- XX /* Following are player variables */ XX extern player_type py; XX extern btype player_title[MAX_CLASS][MAX_PLAYER_LEVEL]; XX! extern bigint_t player_exp[MAX_PLAYER_LEVEL]; XX extern double acc_exp; /* Accumulator for fractional exp*/ XX extern dtype bare_hands; XX extern int char_row; XXIndex: files.c XXRCS file: RCS/files.c,v XXretrieving revision 1.1 XXdiff -c3 -r1.1 files.c XX*** /tmp/,RCSt1a02685 Mon Jan 18 10:28:44 1988 XX--- files.c Mon Dec 7 16:54:33 1987 XX*************** XX*** 20,25 XX void exit(); XX #endif XX XX /* XX * init_scorefile XX * Open the score file while we still have the setuid privileges. Later XX XX--- 20,28 ----- XX void exit(); XX #endif XX XX+ #ifdef PASS1 /* first half */ XX+ XX+ XX /* XX * init_scorefile XX * Open the score file while we still have the setuid privileges. Later XX*************** XX*** 308,315 XX (void) strcpy(out_val, c_ptr->name); XX (void) strcat(out_val, " "); XX (void) fprintf(file1, "%d %s (%c)\n", i, out_val, c_ptr->cchar); XX! (void) fprintf(file1, " Speed ==%d Level ==%d Exp ==%d\n", XX! c_ptr->speed, c_ptr->level, (int)c_ptr->mexp); XX (void) fprintf(file1, " AC ==%d Eye-sight ==%d HD ==%s\n", XX c_ptr->ac, c_ptr->aaf, c_ptr->hd); XX if (0x80000000 & c_ptr->cmove) XX XX--- 311,318 ----- XX (void) strcpy(out_val, c_ptr->name); XX (void) strcat(out_val, " "); XX (void) fprintf(file1, "%d %s (%c)\n", i, out_val, c_ptr->cchar); XX! (void) fprintf(file1, " Speed ==%d Level ==%d Exp ==%ld\n", XX! c_ptr->speed, c_ptr->level, (long)c_ptr->mexp); XX (void) fprintf(file1, " AC ==%d Eye-sight ==%d HD ==%s\n", XX c_ptr->ac, c_ptr->aaf, c_ptr->hd); XX if (0x80000000 & c_ptr->cmove) XX*************** XX*** 610,615 XX } XX } XX XX XX /* Print the character to a file or device -RAK- */ XX file_character() XX XX--- 613,619 ----- XX } XX } XX XX+ #else /* PASS1 */ XX XX /* Print the character to a file or device -RAK- */ XX file_character() XX*************** XX*** 669,675 XX (void) fprintf(file1, " Level :%6d", (int)py.misc.lev); XX (void) fprintf(file1, " Max Hit Points :%6d\n", py.misc.mhp); XX (void) fprintf(file1, " + To Damage :%6d", py.misc.dis_td); XX! (void) fprintf(file1, " Experience :%6d", py.misc.exp); XX (void) fprintf(file1, " Cur Hit Points :%6d\n", (int) (py.misc.chp)); XX (void) fprintf(file1, " + To AC :%6d", py.misc.dis_tac); XX (void) fprintf(file1, " Gold :%6d", py.misc.au); XX XX--- 673,679 ----- XX (void) fprintf(file1, " Level :%6d", (int)py.misc.lev); XX (void) fprintf(file1, " Max Hit Points :%6d\n", py.misc.mhp); XX (void) fprintf(file1, " + To Damage :%6d", py.misc.dis_td); XX! (void) fprintf(file1, " Experience :%6ld", (long)py.misc.exp); XX (void) fprintf(file1, " Cur Hit Points :%6d\n", (int) (py.misc.chp)); XX (void) fprintf(file1, " + To AC :%6d", py.misc.dis_tac); XX (void) fprintf(file1, " Gold :%6d", py.misc.au); XX*************** XX*** 799,801 XX } XX } XX } XX XX--- 803,806 ----- XX } XX } XX } XX+ #endif /* PASS1 */ XXIndex: misc1.c XXRCS file: RCS/misc1.c,v XXretrieving revision 1.1 XXdiff -c3 -r1.1 misc1.c XX*** /tmp/,RCSt1a02690 Mon Jan 18 10:28:57 1988 XX--- misc1.c Wed Dec 9 12:51:20 1987 XX*************** XX*** 179,186 XX int mean; XX int stand; XX { XX! return ((int)((sqrt(-2.0*log(randint((int)9999999)/10000000.0))* XX! cos(6.283*(randint((int)9999999)/10000000.0))*stand) + mean)); XX } XX XX XX XX--- 179,187 ----- XX int mean; XX int stand; XX { XX! /* randint returns number < 2**16; used to divide by 10000000! --peterw 11/87 */ XX! return ((int)((sqrt(-2.0*log(randint((int)49999)/50000.0))* XX! cos(6.283*(randint((int)49999)/50000.0))*stand) + mean)); XX } XX XX XX*************** XX*** 187,193 XX /* Returns position of first set bit -RAK- */ XX /* and clears that bit */ XX int bit_pos(test) XX! unsigned int *test; XX { XX int i; XX int mask = 0x1; XX XX--- 188,194 ----- XX /* Returns position of first set bit -RAK- */ XX /* and clears that bit */ XX int bit_pos(test) XX! bitset_t *test; XX { XX int i; XX int mask = 0x1; XX*************** XX*** 192,198 XX int i; XX int mask = 0x1; XX XX! for (i = 0; i < sizeof(int)*8; i++) { XX if (*test & mask) { XX *test &= ~mask; XX return(i); XX XX--- 193,199 ----- XX int i; XX int mask = 0x1; XX XX! for (i = 0; i < sizeof(*test)*8; i++) { XX if (*test & mask) { XX *test &= ~mask; XX return(i); XXIndex: misc2.c XXRCS file: RCS/misc2.c,v XXretrieving revision 1.1 XXdiff -c3 -r1.1 misc2.c XX*** /tmp/,RCSt1a02695 Mon Jan 18 10:29:11 1988 XX--- misc2.c Wed Dec 9 12:47:19 1987 XX*************** XX*** 453,458 XX } XX XX XX /* Print number with header at given row, column -RAK- */ XX prt_num(header, num, row, column) XX vtype header; XX XX--- 453,471 ----- XX } XX XX XX+ /* Print long number with header at given row, column -RAK- */ XX+ prt_lnum(header, num, row, column) XX+ vtype header; XX+ long num; XX+ int row, column; XX+ { XX+ vtype out_val; XX+ XX+ (void) sprintf(out_val, "%s%6ld ", header, num); XX+ put_buffer(out_val, row, column); XX+ } XX+ XX+ XX /* Print number with header at given row, column -RAK- */ XX prt_num(header, num, row, column) XX vtype header; XX*************** XX*** 923,929 XX prt_stat("CON : ", py.stats.ccon, 10, stat_column); XX prt_stat("CHR : ", py.stats.cchr, 11, stat_column); XX prt_num( "LEV : ", (int)py.misc.lev, 13, stat_column); XX! prt_num( "EXP : ", py.misc.exp, 14, stat_column); XX prt_num( "MANA: ", (int)(py.misc.cmana), 15, stat_column); XX prt_num( "MHP : ", py.misc.mhp, 16, stat_column); XX prt_num( "CHP : ", (int)(py.misc.chp), 17, stat_column); XX XX--- 936,942 ----- XX prt_stat("CON : ", py.stats.ccon, 10, stat_column); XX prt_stat("CHR : ", py.stats.cchr, 11, stat_column); XX prt_num( "LEV : ", (int)py.misc.lev, 13, stat_column); XX! prt_lnum( "EXP : ", (long)py.misc.exp, 14, stat_column); XX prt_num( "MANA: ", (int)(py.misc.cmana), 15, stat_column); XX prt_num( "MHP : ", py.misc.mhp, 16, stat_column); XX prt_num( "CHP : ", (int)(py.misc.chp), 17, stat_column); XX*************** XX*** 1018,1024 XX put_misc2() XX { XX prt_num("Level : ", (int)py.misc.lev, 9, 30); XX! prt_num("Experience : ", py.misc.exp, 10, 30); XX prt_num("Gold : ", py.misc.au, 11, 30); XX prt_num("Max Hit Points : ", py.misc.mhp, 9, 53); XX prt_num("Cur Hit Points : ", (int)py.misc.chp, 10, 53); XX XX--- 1031,1037 ----- XX put_misc2() XX { XX prt_num("Level : ", (int)py.misc.lev, 9, 30); XX! prt_lnum("Experience : ", (long)py.misc.exp, 10, 30); XX prt_num("Gold : ", py.misc.au, 11, 30); XX prt_num("Max Hit Points : ", py.misc.mhp, 9, 53); XX prt_num("Cur Hit Points : ", (int)py.misc.chp, 10, 53); XX*************** XX*** 1392,1398 XX int learn_spell(redraw) XX int *redraw; XX { XX! unsigned int j; XX int i, k, sn, sc; XX int new_spells; XX unsigned int spell_flag; XX XX--- 1405,1411 ----- XX int learn_spell(redraw) XX int *redraw; XX { XX! bitset_t j; XX int i, k, sn, sc; XX int new_spells; XX bitset_t spell_flag; XX*************** XX*** 1395,1401 XX unsigned int j; XX int i, k, sn, sc; XX int new_spells; XX! unsigned int spell_flag; XX spl_type spell; XX int learn; XX spell_type *s_ptr; XX XX--- 1408,1414 ----- XX bitset_t j; XX int i, k, sn, sc; XX int new_spells; XX! bitset_t spell_flag; XX spl_type spell; XX int learn; XX spell_type *s_ptr; XX*************** XX*** 1467,1473 XX { XX int i, j, k, l, new_spell; XX int test_array[32]; XX! unsigned int spell_flag; XX int learn; XX spell_type *s_ptr; XX XX XX--- 1480,1486 ----- XX { XX int i, j, k, l, new_spell; XX int test_array[32]; XX! bitset_t int spell_flag; XX int learn; XX spell_type *s_ptr; XX XX*************** XX*** 1582,1588 XX /* Increases hit points and level -RAK- */ XX gain_level() XX { XX! int nhp, dif_exp, need_exp; XX int redraw; XX vtype out_val; XX struct misc *p_ptr; XX XX--- 1595,1602 ----- XX /* Increases hit points and level -RAK- */ XX gain_level() XX { XX! bigint_t dif_exp, need_exp; XX! int nhp; XX int redraw; XX vtype out_val; XX struct misc *p_ptr; XX*************** XX*** 1640,1646 XX if (p_ptr->exp > p_ptr->max_exp) XX p_ptr->max_exp = p_ptr->exp; XX } XX! prt_num("", py.misc.exp, 14, stat_column+6); XX } XX XX XX XX--- 1654,1660 ----- XX if (p_ptr->exp > p_ptr->max_exp) XX p_ptr->max_exp = p_ptr->exp; XX } XX! prt_lnum("", (long)py.misc.exp, 14, stat_column+6); XX } XX XX XX*************** XX*** 1648,1653 XX insert_str(object_str, mtc_str, insert) XX char *object_str, *mtc_str, *insert; XX { XX int mtc_len, obj_len; XX int bound, pc, i; XX char *temp_obj, *temp_mtc; XX XX--- 1662,1668 ----- XX insert_str(object_str, mtc_str, insert) XX char *object_str, *mtc_str, *insert; XX { XX+ #ifdef XENIX XX int mtc_len, obj_len; XX char *bound, *pc; XX int i; XX*************** XX*** 1649,1654 XX char *object_str, *mtc_str, *insert; XX { XX int mtc_len, obj_len; XX int bound, pc, i; XX char *temp_obj, *temp_mtc; XX char out_val[80]; XX XX--- 1664,1698 ----- XX { XX #ifdef XENIX XX int mtc_len, obj_len; XX+ char *bound, *pc; XX+ int i; XX+ char *temp_obj, *temp_mtc; XX+ char out_val[80]; XX+ XX+ mtc_len = strlen(mtc_str); XX+ obj_len = strlen(object_str); XX+ bound = object_str + obj_len - mtc_len; XX+ for (pc = object_str; pc <= bound; pc++) XX+ { XX+ temp_obj = pc; XX+ temp_mtc = mtc_str; XX+ for (i = 0; i < mtc_len; i++) XX+ if (*temp_obj++ != *temp_mtc++) XX+ break; XX+ if (i == mtc_len) XX+ break; XX+ } XX+ XX+ if (pc <= bound) XX+ { XX+ (void) strncpy(out_val, object_str, pc-object_str); XX+ out_val[pc-object_str] = '\0'; XX+ (void) strcat(out_val, insert); XX+ (void) strcat(out_val, pc+mtc_len); XX+ (void) strcpy(object_str, out_val); XX+ } XX+ #else XX+ int mtc_len, obj_len; XX int bound, pc, i; XX char *temp_obj, *temp_mtc; XX char out_val[80]; XX*************** XX*** 1675,1680 XX (void) strcat(out_val, (char *)(pc+mtc_len)); XX (void) strcpy(object_str, out_val); XX } XX } XX XX XX XX--- 1719,1725 ----- XX (void) strcat(out_val, (char *)(pc+mtc_len)); XX (void) strcpy(object_str, out_val); XX } XX+ #endif XENIX XX } XX XX XX*************** XX*** 1742,1747 XX inkey(&x); XX switch(x) XX { XX case 13: XX break; XX default: XX XX--- 1787,1796 ----- XX inkey(&x); XX switch(x) XX { XX+ #ifdef BUGGY_CURSES XX+ case 10: XX+ x = 13; XX+ #endif BUGGY_CURSES XX case 13: XX break; XX default: XXIndex: moria1.c XXRCS file: RCS/moria1.c,v XXretrieving revision 1.1 XXdiff -c3 -r1.1 moria1.c XX*** /tmp/,RCSt1a02700 Mon Jan 18 10:29:33 1988 XX--- moria1.c Wed Dec 9 11:48:00 1987 XX*************** XX*** 68,74 XX treasure_type tobj; XX int factor; XX { XX! unsigned int item_flags; XX int i, old_dis_ac; XX struct flags *p_ptr; XX struct misc *m_ptr; XX XX--- 68,74 ----- XX treasure_type tobj; XX int factor; XX { XX! bitset_t item_flags; XX int i, old_dis_ac; XX struct flags *p_ptr; XX struct misc *m_ptr; XXIndex: moria2.c XXRCS file: RCS/moria2.c,v XXretrieving revision 1.1 XXdiff -c3 -r1.1 moria2.c XX*** /tmp/,RCSt1a02705 Mon Jan 18 10:29:49 1988 XX--- moria2.c Wed Dec 9 11:47:16 1987 XX*************** XX*** 261,267 XX int *sn, *sc; XX int *redraw; XX { XX! unsigned int j; XX int i, k; XX spl_type spell; XX int cast; XX XX--- 261,267 ----- XX int *sn, *sc; XX int *redraw; XX { XX! bitset_t j; XX int i, k; XX spl_type spell; XX int cast; XX*************** XX*** 327,333 XX /* Examine a Book -RAK- */ XX examine_book() XX { XX! unsigned int j; XX int i, k, item_val; XX int redraw, flag; XX char dummy; XX XX--- 327,333 ----- XX /* Examine a Book -RAK- */ XX examine_book() XX { XX! bitset_t j; XX int i, k, item_val; XX int redraw, flag; XX char dummy; XX*************** XX*** 670,676 XX /* based on flags set in the main creature record */ XX monster_death(y, x, flags) XX int y, x; XX! unsigned int flags; XX { XX int i; XX XX XX--- 670,676 ----- XX /* based on flags set in the main creature record */ XX monster_death(y, x, flags) XX int y, x; XX! bitset_t flags; XX { XX int i; XX XXIndex: potions.c XXRCS file: RCS/potions.c,v XXretrieving revision 1.1 XXdiff -c3 -r1.1 potions.c XX*** /tmp/,RCSt1a02710 Mon Jan 18 10:30:05 1988 XX--- potions.c Wed Dec 9 11:44:23 1987 XX*************** XX*** 6,13 XX /* Potions for the quaffing -RAK- */ XX quaff() XX { XX! unsigned int i; XX! int j, k, l, m, item_val; XX int redraw, ident; XX treasure_type *i_ptr; XX struct misc *m_ptr; XX XX--- 6,14 ----- XX /* Potions for the quaffing -RAK- */ XX quaff() XX { XX! bitset_t i; XX! bigint_t l, m; XX! int j, k, item_val; XX int redraw, ident; XX treasure_type *i_ptr; XX struct misc *m_ptr; XX*************** XX*** 244,250 XX msg_print("You feel your memories fade..."); XX msg_print(""); XX l = (py.misc.exp/5.0); XX! lose_exp(randint(l)+l); XX ident = TRUE; XX break; XX case 34: XX XX--- 245,251 ----- XX msg_print("You feel your memories fade..."); XX msg_print(""); XX l = (py.misc.exp/5.0); XX! lose_exp((bigint_t)randint((int)l)+l); XX ident = TRUE; XX break; XX case 34: XX*************** XX*** 347,353 XX if (i_ptr->flags != 0) XX { XX m_ptr = &py.misc; XX! m_ptr->exp += (int)(i_ptr->level/m_ptr->lev + 0.5); XX prt_experience(); XX } XX add_food(i_ptr->p1); XX XX--- 348,354 ----- XX if (i_ptr->flags != 0) XX { XX m_ptr = &py.misc; XX! m_ptr->exp += (bigint_t)(i_ptr->level/m_ptr->lev + 0.5); XX prt_experience(); XX } XX add_food(i_ptr->p1); XXIndex: scrolls.c XXRCS file: RCS/scrolls.c,v XXretrieving revision 1.1 XXdiff -c3 -r1.1 scrolls.c XX*** /tmp/,RCSt1a02715 Mon Jan 18 10:30:14 1988 XX--- scrolls.c Wed Dec 9 11:43:34 1987 XX*************** XX*** 14,20 XX /* Scrolls for the reading -RAK- */ XX read_scroll() XX { XX! unsigned int i; XX int j, k, l, item_val; XX int y, x; XX int tmp[5]; XX XX--- 14,20 ----- XX /* Scrolls for the reading -RAK- */ XX read_scroll() XX { XX! bitset_t i; XX int j, k, l, item_val; XX int y, x; XX int tmp[5]; XXIndex: spells.c XXRCS file: RCS/spells.c,v XXretrieving revision 1.1 XXdiff -c3 -r1.1 spells.c XX*** /tmp/,RCSt1a02720 Mon Jan 18 10:30:26 1988 XX--- spells.c Wed Dec 9 11:43:08 1987 XX*************** XX*** 649,655 XX /* Return flags for given type area affect -RAK- */ XX get_flags(typ, weapon_type, harm_type, destroy) XX int typ; XX! int *weapon_type, *harm_type; XX int (**destroy)(); XX { XX int set_null(), set_fire_destroy(), set_frost_destroy(); XX XX--- 649,656 ----- XX /* Return flags for given type area affect -RAK- */ XX get_flags(typ, weapon_type, harm_type, destroy) XX int typ; XX! bitset_t *weapon_type; XX! int *harm_type; XX int (**destroy)(); XX { XX int set_null(), set_fire_destroy(), set_frost_destroy(); XX*************** XX*** 701,707 XX ctype bolt_typ; XX { XX int i, oldy, oldx, dist; XX! int weapon_type, harm_type; XX int flag; XX int (*dummy)(); XX cave_type *c_ptr; XX XX--- 702,709 ----- XX ctype bolt_typ; XX { XX int i, oldy, oldx, dist; XX! bitset_t weapon_type; XX! int harm_type; XX int flag; XX int (*dummy)(); XX cave_type *c_ptr; XX*************** XX*** 782,788 XX int i, j, k; XX int dam, max_dis, thit, tkill; XX int oldy, oldx, dist; XX! int weapon_type, harm_type; XX int flag; XX int (*destroy)(); XX cave_type *c_ptr; XX XX--- 784,791 ----- XX int i, j, k; XX int dam, max_dis, thit, tkill; XX int oldy, oldx, dist; XX! bitset_t weapon_type; XX! int harm_type; XX int flag; XX int (*destroy)(); XX cave_type *c_ptr; XX*************** XX*** 830,836 XX { XX c_ptr = &cave[i][j]; XX if (c_ptr->tptr != 0) XX! if (destroy(t_list[c_ptr->tptr].tval)) XX (void) delete_object(i, j); XX if (c_ptr->fopen) XX { XX XX--- 833,839 ----- XX { XX c_ptr = &cave[i][j]; XX if (c_ptr->tptr != 0) XX! if ((*destroy)(t_list[c_ptr->tptr].tval)) XX (void) delete_object(i, j); XX if (c_ptr->fopen) XX { XX*************** XX*** 920,926 XX { XX int i, j; XX int dam, max_dis; XX! int weapon_type, harm_type; XX int (*destroy)(); XX cave_type *c_ptr; XX monster_type *m_ptr; XX XX--- 923,930 ----- XX { XX int i, j; XX int dam, max_dis; XX! bitset_t weapon_type; XX! int harm_type; XX int (*destroy)(); XX cave_type *c_ptr; XX monster_type *m_ptr; XX*************** XX*** 935,941 XX { XX c_ptr = &cave[i][j]; XX if (c_ptr->tptr != 0) XX! if (destroy(t_list[c_ptr->tptr].tval)) XX (void) delete_object(i, j); XX if (c_ptr->fopen) XX { XX XX--- 939,945 ----- XX { XX c_ptr = &cave[i][j]; XX if (c_ptr->tptr != 0) XX! if ((*destroy)(t_list[c_ptr->tptr].tval)) XX (void) delete_object(i, j); XX if (c_ptr->fopen) XX { XX*************** XX*** 2229,2235 XX XX /* Lose experience -RAK- */ XX lose_exp(amount) XX! int amount; XX { XX int i, j; XX int av_hp, lose_hp; XX XX--- 2233,2239 ----- XX XX /* Lose experience -RAK- */ XX lose_exp(amount) XX! bigint_t amount; XX { XX int i, j; XX int av_hp, lose_hp; XXIndex: staffs.c XXRCS file: RCS/staffs.c,v XXretrieving revision 1.1 XXdiff -c3 -r1.1 staffs.c XX*** /tmp/,RCSt1a02725 Mon Jan 18 10:30:49 1988 XX--- staffs.c Wed Dec 9 11:54:00 1987 XX*************** XX*** 6,12 XX /* Use a staff... -RAK- */ XX use() XX { XX! unsigned int i; XX int j, k, item_val, chance; XX int y, x; XX int redraw, ident; XX XX--- 6,12 ----- XX /* Use a staff... -RAK- */ XX use() XX { XX! bitset_t i; XX int j, k, item_val, chance; XX int y, x; XX int redraw, ident; XXIndex: store2.c XXRCS file: RCS/store2.c,v XXretrieving revision 1.1 XXdiff -c3 -r1.1 store2.c XX*** /tmp/,RCSt1a02730 Mon Jan 18 10:30:56 1988 XX--- store2.c Sun Dec 6 14:54:57 1987 XX*************** XX*** 948,954 XX (void) sprintf(out_val, "Selling %s (%c)", tmp_str, item_val+97); XX msg_print(out_val); XX msg_print(" "); XX! if ((store_buy[store_num])(inventory[INVEN_MAX].tval)) XX if (store_check_num(store_num)) XX switch(sell_haggle(store_num, &price, inventory[INVEN_MAX])) XX { XX XX--- 948,954 ----- XX (void) sprintf(out_val, "Selling %s (%c)", tmp_str, item_val+97); XX msg_print(out_val); XX msg_print(" "); XX! if ((*store_buy[store_num])(inventory[INVEN_MAX].tval)) XX if (store_check_num(store_num)) XX switch(sell_haggle(store_num, &price, inventory[INVEN_MAX])) XX { XXIndex: types.h XXRCS file: RCS/types.h,v XXretrieving revision 1.1 XXdiff -c3 -r1.1 types.h XX*** /tmp/,RCSt1a02735 Mon Jan 18 10:31:08 1988 XX--- types.h Wed Dec 9 11:44:00 1987 XX*************** XX*** 1,3 XX typedef unsigned char byteint; XX #ifdef NO_SIGNED_CHARS XX typedef short bytlint; XX XX--- 1,5 ----- XX+ typedef unsigned long bitset_t; XX+ typedef unsigned long bigint_t; XX typedef unsigned char byteint; XX #ifdef NO_SIGNED_CHARS XX typedef short bytlint; XX*************** XX*** 19,26 XX typedef struct creature_type XX { XX ctype name; /* Descrip of creature */ XX! unsigned int cmove; /* Bit field */ XX! unsigned int spells; /* Creature spells */ XX wordint cdefense; /* Bit field */ XX worlint sleep; /* Inactive counter */ XX wordint mexp; /* Exp value for kill */ XX XX--- 21,28 ----- XX typedef struct creature_type XX { XX ctype name; /* Descrip of creature */ XX! bitset_t cmove; /* Bit field */ XX! bitset_t spells; /* Creature spells */ XX wordint cdefense; /* Bit field */ XX worlint sleep; /* Inactive counter */ XX wordint mexp; /* Exp value for kill */ XX*************** XX*** 54,60 XX ttype name; /* Object name */ XX byteint tval; /* Category number */ XX char tchar; /* Character representation*/ XX! unsigned int flags; /* Special flags */ XX int p1; /* Misc. use variable */ XX int cost; /* Cost of item */ XX int subval; /* Sub-category number */ XX XX--- 56,62 ----- XX ttype name; /* Object name */ XX byteint tval; /* Category number */ XX char tchar; /* Character representation*/ XX! bitset_t flags; /* Special flags */ XX int p1; /* Misc. use variable */ XX int cost; /* Cost of item */ XX int subval; /* Sub-category number */ XX*************** XX*** 77,84 XX vtype sex; /* Sex of character */ XX vtype title; /* Character's title */ XX vtype tclass; /* Character's class */ XX! int max_exp; /* Max experience*/ XX! int exp; /* Cur experience */ XX int au; /* Gold */ XX wordint age; /* Characters age*/ XX wordint ht; /* Height */ XX XX--- 79,86 ----- XX vtype sex; /* Sex of character */ XX vtype title; /* Character's title */ XX vtype tclass; /* Character's class */ XX! bigint_t max_exp; /* Max experience*/ XX! bigint_t exp; /* Cur experience */ XX int au; /* Gold */ XX wordint age; /* Characters age*/ XX wordint ht; /* Height */ XX*************** XX*** 128,134 XX } stats; XX struct flags XX { XX! unsigned int status; /* Status of player */ XX int rest; /* Rest counter */ XX int blind; /* Blindness counter */ XX int paralysis; /* Paralysis counter */ XX XX--- 130,136 ----- XX } stats; XX struct flags XX { XX! bitset_t status; /* Status of player */ XX int rest; /* Rest counter */ XX int blind; /* Blindness counter */ XX int paralysis; /* Paralysis counter */ XX*************** XX*** 221,227 XX bytlint bsav; /* Race base for saving throw */ XX bytlint bhitdie; /* Base hit points for race */ XX bytlint infra; /* See infra-red */ XX! unsigned int tclass; /* Bit field for class types */ XX } race_type; XX XX typedef struct class_type XX XX--- 223,229 ----- XX bytlint bsav; /* Race base for saving throw */ XX bytlint bhitdie; /* Base hit points for race */ XX bytlint infra; /* See infra-red */ XX! bitset_t rtclass; /* Bit field for class types */ XX } race_type; XX XX typedef struct class_type XX*************** XX*** 270,275 XX int fm; /* used for hidden objects */ XX int pl; XX int tl; XX } cave_type; XX XX typedef struct owner_type XX XX--- 272,279 ----- XX int fm; /* used for hidden objects */ XX int pl; XX int tl; XX+ int __pad1; /* pad to 16 bytes */ XX+ int __pad2; /* pad to 16 bytes */ XX } cave_type; XX XX typedef struct owner_type XXIndex: variables.c XXRCS file: RCS/variables.c,v XXretrieving revision 1.1 XXdiff -c3 -r1.1 variables.c XX*** /tmp/,RCSt1a02740 Mon Jan 18 10:31:18 1988 XX--- variables.c Wed Dec 9 11:44:15 1987 XX*************** XX*** 3,9 XX XX int character_generated = 0; /* don't save score until char gen finished */ XX int highscore_fd; /* File descriptor to high score file */ XX! int player_max_exp; /* Max exp possible */ XX char norm_state[STATE_SIZE]; /* normal seed */ XX char randes_state[STATE_SIZE]; /* For encoding colors */ XX int randes_seed; /* for restarting randes_state */ XX XX--- 3,9 ----- XX XX int character_generated = 0; /* don't save score until char gen finished */ XX int highscore_fd; /* File descriptor to high score file */ XX! bigint_t player_max_exp; /* Max exp possible */ XX char norm_state[STATE_SIZE]; /* normal seed */ XX char randes_state[STATE_SIZE]; /* For encoding colors */ XX int randes_seed; /* for restarting randes_state */ XX*************** XX*** 48,54 XX int closing_flag = 0; /* Used for closing */ XX XX /* Bit testing array */ XX! unsigned int bit_array[32] = {0x00000001, 0x00000002, 0x00000004, 0x00000008, XX 0x00000010, 0x00000020, 0x00000040, 0x00000080, XX 0x00000100, 0x00000200, 0x00000400, 0x00000800, XX 0x00001000, 0x00002000, 0x00004000, 0x00008000, XX XX--- 48,54 ----- XX int closing_flag = 0; /* Used for closing */ XX XX /* Bit testing array */ XX! bitset_t bit_array[32] = {0x00000001, 0x00000002, 0x00000004, 0x00000008, XX 0x00000010, 0x00000020, 0x00000040, 0x00000080, XX 0x00000100, 0x00000200, 0x00000400, 0x00000800, XX 0x00001000, 0x00002000, 0x00004000, 0x00008000, XX*************** XX*** 66,72 XX int panel_col_prt,panel_row_prt; XX XX /* Following are all floor definitions */ XX! cave_type cave[MAX_HEIGHT][MAX_WIDTH]; XX /* Values for floor types */ XX /* if fval is more than 4 bits then the save file routines must be changed */ XX cave_type blank_floor = { 0, 0, 0, FALSE, FALSE, FALSE, FALSE}; XX XX--- 66,72 ----- XX int panel_col_prt,panel_row_prt; XX XX /* Following are all floor definitions */ XX! cave_type huge cave[MAX_HEIGHT][MAX_WIDTH]; XX /* Values for floor types */ XX /* if fval is more than 4 bits then the save file routines must be changed */ XX cave_type blank_floor = { 0, 0, 0, FALSE, FALSE, FALSE, FALSE}; XX*************** XX*** 155,161 XX }; XX XX /* Base experience levels, may be adjusted up for race and/or class*/ XX! int player_exp[MAX_PLAYER_LEVEL] = { XX 10, 25, 45, 70, 100, 140, 200, 280, 380, 500, XX 650, 850, 1100, 1400, 1800, 2300, 2900, 3600, 4400, 5400, XX 6800, 8400, 10200, 12500, 17500, 25000, 35000, 50000, 75000,100000, XX XX--- 155,161 ----- XX }; XX XX /* Base experience levels, may be adjusted up for race and/or class*/ XX! bigint_t player_exp[MAX_PLAYER_LEVEL] = { XX 10, 25, 45, 70, 100, 140, 200, 280, 380, 500, XX 650, 850, 1100, 1400, 1800, 2300, 2900, 3600, 4400, 5400, XX 6800, 8400, 10200, 12500, 17500, 25000, 35000, 50000, 75000,100000, XXIndex: wands.c XXRCS file: RCS/wands.c,v XXretrieving revision 1.1 XXdiff -c3 -r1.1 wands.c XX*** /tmp/,RCSt1a02745 Mon Jan 18 10:31:30 1988 XX--- wands.c Wed Dec 9 11:54:30 1987 XX*************** XX*** 6,12 XX /* Wands for the aiming... */ XX aim() XX { XX! unsigned int i; XX int j, k, l, chance; XX int dir, item_val; XX int dumy, y_dumy, x_dumy; XX XX--- 6,12 ----- XX /* Wands for the aiming... */ XX aim() XX { XX! bitset_t i; XX int j, k, l, chance; XX int dir, item_val; XX int dumy, y_dumy, x_dumy; XXIndex: wizard.c XXRCS file: RCS/wizard.c,v XXretrieving revision 1.1 XXdiff -c3 -r1.1 wizard.c XX*** /tmp/,RCSt1a02750 Mon Jan 18 10:31:38 1988 XX--- wizard.c Sun Dec 6 14:55:08 1987 XX*************** XX*** 13,18 XX char *sprintf(); XX #endif XX XX XX /* Print Moria credits -RAK- */ XX game_version() XX XX--- 13,19 ----- XX char *sprintf(); XX #endif XX XX+ #ifdef PASS1 /* First pass */ XX XX /* Print Moria credits -RAK- */ XX game_version() XX*************** XX*** 239,244 XX py_bonuses(blank_treasure, 0); XX } XX XX XX /* Wizard routine for creating objects -RAK- */ XX wizard_create() XX XX--- 240,246 ----- XX py_bonuses(blank_treasure, 0); XX } XX XX+ #else /* PASS1 */ XX XX /* Wizard routine for creating objects -RAK- */ XX wizard_create() XX*************** XX*** 375,377 XX } XX inventory[INVEN_MAX] = blank_treasure; XX } XX XX--- 377,380 ----- XX } XX inventory[INVEN_MAX] = blank_treasure; XX } XX+ #endif /* PASS1 */ XEND_OF_diffs.xenix Xif test 35406 -ne `wc -c <diffs.xenix`; then X echo shar: \"diffs.xenix\" unpacked with wrong size! Xfi X# end of overwriting check Xfi Xecho shar: End of shell archive. Xexit 0 X X END_OF_FILE if test 49819 -ne `wc -c <'Xenix.patch'`; then echo shar: \"'Xenix.patch'\" unpacked with wrong size! fi # end of 'Xenix.patch' fi if test -f 'wands.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'wands.c'\" else echo shar: Extracting \"'wands.c'\" \(4215 characters\) sed "s/^X//" >'wands.c' <<'END_OF_FILE' X#include "constants.h" X#include "config.h" X#include "types.h" X#include "externs.h" X X X/* Wands for the aiming... */ Xaim() X{ X unsigned int i; X int j, k, l, chance; X int dir, item_val; X int dumy, y_dumy, x_dumy; X int redraw, ident; X register treasure_type *i_ptr; X register struct misc *m_ptr; X X redraw = FALSE; X reset_flag = TRUE; X if (inven_ctr > 0) X { X if (find_range(65, -1, &j, &k)) X { X if (get_item(&item_val, "Aim which wand?", &redraw, j, k)) X { X i_ptr = &inventory[item_val]; X if (redraw) draw_cave(); X reset_flag = FALSE; X redraw = FALSE; X y_dumy = char_row; X x_dumy = char_col; X if (get_dir("Which direction?", &dir, &dumy, &y_dumy, &x_dumy)) X { X if (py.flags.confused > 0) X { X msg_print("You are confused..."); X do X { X dir = randint(9); X } X while (dir == 5); X } X i = i_ptr->flags; X ident = FALSE; X m_ptr = &py.misc; X chance = m_ptr->save + m_ptr->lev + int_adj() - i_ptr->level; X if (py.flags.confused > 0) X chance = chance / 2.0; X if (chance <= 0) chance = 1; X if (randint(chance) < USE_DEVICE) X msg_print("You failed to use the wand properly."); X else if (i_ptr->p1 > 0) X { X (i_ptr->p1)--; X while (i != 0) X { X j = bit_pos(&i) + 1; X k = char_row; X l = char_col; X /* Wands */ X switch(j) X { X case 1: X msg_print("A line of blue shimmering light appears."); X light_line(dir, char_row, char_col); X ident = TRUE; X break; X case 2: X fire_bolt(1, dir, k, l, damroll("3d8"), X "Lightning Bolt"); X ident = TRUE; X break; X case 3: X fire_bolt(4, dir, k, l, damroll("4d8"), X "Frost Bolt"); X ident = TRUE; X break; X case 4: X fire_bolt(5, dir, k, l, damroll("6d8"), X "Fire Bolt"); X ident = TRUE; X break; X case 5: X ident = wall_to_mud(dir, k, l); X break; X case 6: X ident = poly_monster(dir, k, l); X break; X case 7: X ident = hp_monster(dir, k, l, -damroll("4d6")); X break; X case 8: X ident = speed_monster(dir, k, l, 1); X break; X case 9: X ident = speed_monster(dir, k, l, -1); X break; X case 10: X ident = confuse_monster(dir, k, l); X break; X case 11: X ident = sleep_monster(dir, k, l); X break; X case 12: X ident = drain_life(dir, k, l); X break; X case 13: X ident = td_destroy2(dir, k, l); X break; X case 14: X fire_bolt(0, dir, k, l, damroll("2d6"), X "Magic Missile"); X ident = TRUE; X break; X case 15: X ident = build_wall(dir, k, l); X break; X case 16: X ident = clone_monster(dir, k, l); X break; X case 17: X ident = teleport_monster(dir, k, l); X break; X case 18: X ident = disarm_all(dir, k, l); X break; X case 19: X fire_ball(1, dir, k, l, 24, "Lightning Ball"); X ident = TRUE; X break; X case 20: X fire_ball(4, dir, k, l, 32, "Cold Ball"); X ident = TRUE; X break; X case 21: X fire_ball(5, dir, k, l, 48, "Fire Ball"); X ident = TRUE; X break; X case 22: X fire_ball(2, dir, k, l, 8, "Stinking Cloud"); X ident = TRUE; X break; X case 23: X fire_ball(3, dir, k, l, 40, "Acid Ball"); X ident = TRUE; X break; X case 24: X i = 2 << (randint(23) - 1); X break; X default: X break; X } X /* End of Wands... */ X } X if (ident) X identify(inventory[item_val]); X if (i_ptr->flags != 0) X { X m_ptr = &py.misc; X m_ptr->exp += ((i_ptr->level/m_ptr->lev) + 0.5); X prt_experience(); X } X desc_charges(item_val); X } X else X msg_print("The wand has no charges left."); X } X } X } X else X msg_print("You are not carrying any wands."); X } X else X msg_print("But you are not carrying anything."); X if (redraw) draw_cave(); X} END_OF_FILE if test 4215 -ne `wc -c <'wands.c'`; then echo shar: \"'wands.c'\" unpacked with wrong size! fi # end of 'wands.c' fi echo shar: End of archive 4 \(of 18\). cp /dev/null ark4isdone MISSING="" for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have unpacked all 18 archives. rm -f ark[1-9]isdone ark[1-9][0-9]isdone else echo You still need to unpack the following archives: echo " " ${MISSING} fi ## End of shell archive. exit 0