Mercurial > hg > early-roguelike
comparison arogue7/rip.c @ 225:4f6e056438eb
Merge the GCC5 and build fix branches.
author | John "Elwin" Edwards |
---|---|
date | Wed, 02 Mar 2016 21:28:34 -0500 |
parents | f9ef86cf22b2 |
children | d3968e9cb98d |
comparison
equal
deleted
inserted
replaced
224:4d0f53998e8a | 225:4f6e056438eb |
---|---|
89 " *| * * * | *", | 89 " *| * * * | *", |
90 " ________)/\\\\_//(\\/(/\\)/\\//\\/|_)_______", | 90 " ________)/\\\\_//(\\/(/\\)/\\//\\/|_)_______", |
91 0 | 91 0 |
92 }; | 92 }; |
93 | 93 |
94 char *killname(); | 94 char *killname(short monst); |
95 | 95 void showpack(char *howso); |
96 | 96 int update(struct sc_ent top_ten[], unsigned long amount, short quest, |
97 | 97 char *whoami, short flags, short level, short monst, short ctype, |
98 char *system, char *login); | |
98 | 99 |
99 | 100 |
100 void | 101 void |
101 byebye(sig) | 102 byebye(int sig) |
102 int sig; | |
103 { | 103 { |
104 if (!isendwin()) { | 104 if (!isendwin()) { |
105 clear(); | 105 clear(); |
106 endwin(); | 106 endwin(); |
107 } | 107 } |
116 /* | 116 /* |
117 * death: | 117 * death: |
118 * Do something really fun when he dies | 118 * Do something really fun when he dies |
119 */ | 119 */ |
120 | 120 |
121 death(monst) | 121 void |
122 register short monst; | 122 death(short monst) |
123 { | 123 { |
124 register char **dp = rip, *killer; | 124 register char **dp = rip, *killer; |
125 register struct tm *lt; | 125 register struct tm *lt; |
126 time_t date; | 126 time_t date; |
127 char buf[LINELEN]; | 127 char buf[LINELEN]; |
152 | 152 |
153 #ifdef PC7300 | 153 #ifdef PC7300 |
154 /* | 154 /* |
155 * Restore window characteristics on a hard window terminal (PC7300). | 155 * Restore window characteristics on a hard window terminal (PC7300). |
156 */ | 156 */ |
157 endhardwin() | 157 void |
158 endhardwin(void) | |
158 { | 159 { |
159 register int i; | 160 register int i; |
160 struct utdata labelbuf; | 161 struct utdata labelbuf; |
161 | 162 |
162 /* Restore the old window size */ | 163 /* Restore the old window size */ |
170 } | 171 } |
171 } | 172 } |
172 #endif | 173 #endif |
173 | 174 |
174 char * | 175 char * |
175 killname(monst) | 176 killname(short monst) |
176 register short monst; | |
177 { | 177 { |
178 static char mons_name[LINELEN]; | 178 static char mons_name[LINELEN]; |
179 int i; | 179 int i; |
180 | 180 |
181 if (monst > NUMMONST) return("a strange monster"); | 181 if (monst > NUMMONST) return("a strange monster"); |
247 /* | 247 /* |
248 * score -- figure score and post it. | 248 * score -- figure score and post it. |
249 */ | 249 */ |
250 | 250 |
251 /* VARARGS2 */ | 251 /* VARARGS2 */ |
252 score(amount, flags, monst) | 252 void |
253 unsigned long amount; | 253 score(unsigned long amount, int flags, short monst) |
254 short monst; | |
255 { | 254 { |
256 static struct sc_ent top_ten[NUMSCORE]; | 255 static struct sc_ent top_ten[NUMSCORE]; |
257 register struct sc_ent *scp; | 256 register struct sc_ent *scp; |
258 register int i; | 257 register int i; |
259 register struct sc_ent *sc2; | 258 register struct sc_ent *sc2; |
670 | 669 |
671 /* | 670 /* |
672 * scorein: | 671 * scorein: |
673 * Convert a character string that has been translated from a | 672 * Convert a character string that has been translated from a |
674 * score file by scoreout() back to a score file structure. | 673 * score file by scoreout() back to a score file structure. |
674 * num_bytes: Number of bytes of input that we want to convert | |
675 */ | 675 */ |
676 scorein(input, scores, num_bytes) | 676 void |
677 unsigned char *input; | 677 scorein(unsigned char *input, struct sc_ent scores[], int num_bytes) |
678 struct sc_ent scores[]; | |
679 int num_bytes; /* Number of bytes of input that we want to convert */ | |
680 { | 678 { |
681 register int i, j; | 679 register int i, j; |
682 unsigned long *lptr; | 680 unsigned long *lptr; |
683 unsigned short *sptr; | 681 unsigned short *sptr; |
684 unsigned char *cptr; | 682 unsigned char *cptr; |
729 * scoreout: | 727 * scoreout: |
730 * Convert a score file structure to a character string. We do | 728 * Convert a score file structure to a character string. We do |
731 * this for compatibility sake since some machines write out fields in | 729 * this for compatibility sake since some machines write out fields in |
732 * different orders. | 730 * different orders. |
733 */ | 731 */ |
734 scoreout(scores, output) | 732 void |
735 struct sc_ent scores[]; | 733 scoreout(struct sc_ent scores[], unsigned char *output) |
736 unsigned char *output; | |
737 { | 734 { |
738 register int i, j; | 735 register int i, j; |
739 unsigned long *lptr; | 736 unsigned long *lptr; |
740 unsigned short *sptr; | 737 unsigned short *sptr; |
741 unsigned char *cptr; | 738 unsigned char *cptr; |
781 | 778 |
782 /* | 779 /* |
783 * showpack: | 780 * showpack: |
784 * Display the contents of the hero's pack | 781 * Display the contents of the hero's pack |
785 */ | 782 */ |
786 showpack(howso) | 783 void |
787 char *howso; | 784 showpack(char *howso) |
788 { | 785 { |
789 reg char *iname; | 786 reg char *iname; |
790 reg int cnt, packnum; | 787 reg int cnt, packnum; |
791 reg struct linked_list *item; | 788 reg struct linked_list *item; |
792 reg struct object *obj; | 789 reg struct object *obj; |
811 } | 808 } |
812 mvprintw(cnt + 1,0,"--- %d Gold Pieces ---",purse); | 809 mvprintw(cnt + 1,0,"--- %d Gold Pieces ---",purse); |
813 refresh(); | 810 refresh(); |
814 } | 811 } |
815 | 812 |
816 total_winner() | 813 void |
814 total_winner(void) | |
817 { | 815 { |
818 register struct linked_list *item; | 816 register struct linked_list *item; |
819 register struct object *obj; | 817 register struct object *obj; |
820 register int worth; | 818 register int worth; |
821 register char c; | 819 register char c; |
874 endhardwin(); | 872 endhardwin(); |
875 #endif | 873 #endif |
876 exit(0); | 874 exit(0); |
877 } | 875 } |
878 | 876 |
879 update(top_ten, amount, quest, whoami, flags, level, monst, ctype, system, login) | 877 int |
880 struct sc_ent top_ten[]; | 878 update(struct sc_ent top_ten[], unsigned long amount, short quest, char *whoami, |
881 unsigned long amount; | 879 short flags, short level, short monst, short ctype, char *system, |
882 short quest, flags, level, monst, ctype; | 880 char *login) |
883 char *whoami, *system, *login; | |
884 { | 881 { |
885 register struct sc_ent *scp, *sc2; | 882 register struct sc_ent *scp, *sc2; |
886 int retval=0; /* 1 if a change, 0 otherwise */ | 883 int retval=0; /* 1 if a change, 0 otherwise */ |
887 | 884 |
888 for (scp = top_ten; scp < &top_ten[NUMSCORE]; scp++) { | 885 for (scp = top_ten; scp < &top_ten[NUMSCORE]; scp++) { |