Mercurial > hg > early-roguelike
comparison arogue5/rip.c @ 218:56e748983fa8
Advanced Rogue 5: convert to ANSI function declarations.
This still leaves over a thousand lines of warning messages, mostly
related to the return types of daemons and fuses.
author | John "Elwin" Edwards |
---|---|
date | Sun, 07 Feb 2016 14:39:21 -0500 |
parents | 80a590e67206 |
children | d3968e9cb98d |
comparison
equal
deleted
inserted
replaced
217:94a0d9dd5ce1 | 218:56e748983fa8 |
---|---|
69 " *| * * * | *", | 69 " *| * * * | *", |
70 " ________)/\\\\_//(\\/(/\\)/\\//\\/|_)_______", | 70 " ________)/\\\\_//(\\/(/\\)/\\//\\/|_)_______", |
71 0 | 71 0 |
72 }; | 72 }; |
73 | 73 |
74 char *killname(); | 74 char *killname(short monst); |
75 | 75 void scorein(struct sc_ent scores[], int fd); |
76 | 76 void scoreout(struct sc_ent scores[], FILE *outf); |
77 | 77 void showpack(char *howso); |
78 int update(struct sc_ent top_ten[], unsigned long amount, short quest, | |
79 char *whoami, short flags, short level, short monst, short ctype, | |
80 char *system, char *login); | |
78 | 81 |
79 | 82 |
80 void | 83 void |
81 byebye(sig) | 84 byebye(int sig) |
82 int sig; | |
83 { | 85 { |
84 NOOP(sig); | 86 NOOP(sig); |
85 if (!isendwin()) { | 87 if (!isendwin()) { |
86 clear(); | 88 clear(); |
87 endwin(); | 89 endwin(); |
94 /* | 96 /* |
95 * death: | 97 * death: |
96 * Do something really fun when he dies | 98 * Do something really fun when he dies |
97 */ | 99 */ |
98 | 100 |
99 death(monst) | 101 void |
100 register short monst; | 102 death(short monst) |
101 { | 103 { |
102 register char **dp = rip, *killer; | 104 register char **dp = rip, *killer; |
103 register struct tm *lt; | 105 register struct tm *lt; |
104 time_t date; | 106 time_t date; |
105 char buf[80]; | 107 char buf[80]; |
123 score(pstats.s_exp, KILLED, monst); | 125 score(pstats.s_exp, KILLED, monst); |
124 exit(0); | 126 exit(0); |
125 } | 127 } |
126 | 128 |
127 char * | 129 char * |
128 killname(monst) | 130 killname(short monst) |
129 register short monst; | |
130 { | 131 { |
131 static char mons_name[LINELEN]; | 132 static char mons_name[LINELEN]; |
132 int i; | 133 int i; |
133 | 134 |
134 if (monst > NUMMONST) return("a strange monster"); | 135 if (monst > NUMMONST) return("a strange monster"); |
160 /* | 161 /* |
161 * score -- figure score and post it. | 162 * score -- figure score and post it. |
162 */ | 163 */ |
163 | 164 |
164 /* VARARGS2 */ | 165 /* VARARGS2 */ |
165 score(amount, flags, monst) | 166 void |
166 unsigned long amount; | 167 score(unsigned long amount, int flags, short monst) |
167 short monst; | |
168 { | 168 { |
169 static struct sc_ent top_ten[NUMSCORE]; | 169 static struct sc_ent top_ten[NUMSCORE]; |
170 register struct sc_ent *scp; | 170 register struct sc_ent *scp; |
171 register int i; | 171 register int i; |
172 register struct sc_ent *sc2; | 172 register struct sc_ent *sc2; |
624 /* | 624 /* |
625 * scorein: | 625 * scorein: |
626 * Convert a character string that has been translated from a | 626 * Convert a character string that has been translated from a |
627 * score file by scoreout() back to a score file structure. | 627 * score file by scoreout() back to a score file structure. |
628 */ | 628 */ |
629 scorein(scores, fd) | 629 void |
630 struct sc_ent scores[]; | 630 scorein(struct sc_ent scores[], int fd) |
631 int fd; | |
632 { | 631 { |
633 int i; | 632 int i; |
634 char scoreline[100]; | 633 char scoreline[100]; |
635 | 634 |
636 for(i = 0; i < NUMSCORE; i++) | 635 for(i = 0; i < NUMSCORE; i++) |
650 * scoreout: | 649 * scoreout: |
651 * Convert a score file structure to a character string. We do | 650 * Convert a score file structure to a character string. We do |
652 * this for compatibility sake since some machines write out fields in | 651 * this for compatibility sake since some machines write out fields in |
653 * different orders. | 652 * different orders. |
654 */ | 653 */ |
655 scoreout(scores, outf) | 654 void |
656 struct sc_ent scores[]; | 655 scoreout(struct sc_ent scores[], FILE *outf) |
657 FILE *outf; | |
658 { | 656 { |
659 int i; | 657 int i; |
660 char scoreline[100]; | 658 char scoreline[100]; |
661 | 659 |
662 for(i = 0; i < NUMSCORE; i++) { | 660 for(i = 0; i < NUMSCORE; i++) { |
674 | 672 |
675 /* | 673 /* |
676 * showpack: | 674 * showpack: |
677 * Display the contents of the hero's pack | 675 * Display the contents of the hero's pack |
678 */ | 676 */ |
679 showpack(howso) | 677 void |
680 char *howso; | 678 showpack(char *howso) |
681 { | 679 { |
682 reg char *iname; | 680 reg char *iname; |
683 reg int cnt, packnum; | 681 reg int cnt, packnum; |
684 reg struct linked_list *item; | 682 reg struct linked_list *item; |
685 reg struct object *obj; | 683 reg struct object *obj; |
704 } | 702 } |
705 mvprintw(cnt + 1,0,"--- %d Gold Pieces ---",purse); | 703 mvprintw(cnt + 1,0,"--- %d Gold Pieces ---",purse); |
706 refresh(); | 704 refresh(); |
707 } | 705 } |
708 | 706 |
709 total_winner() | 707 void |
708 total_winner(void) | |
710 { | 709 { |
711 register struct linked_list *item; | 710 register struct linked_list *item; |
712 register struct object *obj; | 711 register struct object *obj; |
713 register int worth; | 712 register int worth; |
714 register char c; | 713 register char c; |
758 writelog(pstats.s_exp + (long) purse, WINNER, '\0'); | 757 writelog(pstats.s_exp + (long) purse, WINNER, '\0'); |
759 score(pstats.s_exp + (long) purse, WINNER, '\0'); | 758 score(pstats.s_exp + (long) purse, WINNER, '\0'); |
760 exit(0); | 759 exit(0); |
761 } | 760 } |
762 | 761 |
763 update(top_ten, amount, quest, whoami, flags, level, monst, ctype, system, login) | 762 int |
764 struct sc_ent top_ten[]; | 763 update(struct sc_ent top_ten[], unsigned long amount, short quest, |
765 unsigned long amount; | 764 char *whoami, short flags, short level, short monst, short ctype, |
766 short quest, flags, level, monst, ctype; | 765 char *system, char *login) |
767 char *whoami, *system, *login; | |
768 { | 766 { |
769 register struct sc_ent *scp, *sc2; | 767 register struct sc_ent *scp, *sc2; |
770 int retval=0; /* 1 if a change, 0 otherwise */ | 768 int retval=0; /* 1 if a change, 0 otherwise */ |
771 | 769 |
772 for (scp = top_ten; scp < &top_ten[NUMSCORE]; scp++) { | 770 for (scp = top_ten; scp < &top_ten[NUMSCORE]; scp++) { |