Mercurial > hg > early-roguelike
comparison arogue5/rogue.h @ 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 | 7795b0938921 |
| children | b67b99f6c92b |
comparison
equal
deleted
inserted
replaced
| 217:94a0d9dd5ce1 | 218:56e748983fa8 |
|---|---|
| 941 short s_cost; /* cost of casting spell */ | 941 short s_cost; /* cost of casting spell */ |
| 942 short s_type; /* scroll or potion */ | 942 short s_type; /* scroll or potion */ |
| 943 int s_flag; /* is the spell blessed/cursed? */ | 943 int s_flag; /* is the spell blessed/cursed? */ |
| 944 }; | 944 }; |
| 945 | 945 |
| 946 struct linked_list *find_mons(), *find_obj(), *get_item(), *new_item(), | 946 void _attach(struct linked_list **list, struct linked_list *item); |
| 947 *new_thing(), *wake_monster(), *get_hurl(), | 947 void _detach(struct linked_list **list, struct linked_list *item); |
| 948 *spec_item(), *creat_item(); | 948 void _o_free_list(struct linked_list **ptr); |
| 949 struct object *wield_weap(); | 949 void _t_free_list(struct linked_list **ptr); |
| 950 struct room *roomin(); | 950 int ac_compute(void); |
| 951 struct trap *trap_at(); | 951 void activity(void); |
| 952 | 952 void add_dexterity(bool cursed); |
| 953 char *tr_name(), *new(), | 953 void add_intelligence(bool cursed); |
| 954 *vowelstr(), *inv_name(), | 954 bool add_pack(struct linked_list *item, bool silent, |
| 955 *ctime(), *num(), *ring_num(), *misc_num(), *blesscurse(), *typ_name(), | 955 struct linked_list **packret); |
| 956 *weap_name(), *misc_name(); | 956 void add_slow(void); |
| 957 coord *rndmove(), *can_shoot(), *fallpos(); | 957 void add_wisdom(bool cursed); |
| 958 short randmonster(), id_monst(); | 958 void addmsg(char *fmt, ...); |
| 959 void quit(int sig), tstp(int sig), auto_save(int sig), bugkill(int sig), endit(int sig); | 959 void affect(void); |
| 960 int rnd(), wghtchk(), nohaste(), res_strength(), | 960 void aggravate(void); |
| 961 doctor(), runners(), swander(), unconfuse(), unsee(), fumble(), | 961 void alchemy(struct object *obj); |
| 962 unclrhead(), unphase(), noslow(), rollwand(), stomach(), sight(), | 962 void appear(void); |
| 963 unstink(), suffocate(), cure_disease(), un_itch(), shoot_bolt(), | 963 bool attack(struct thing *mp, struct object *weapon, bool thrown); |
| 964 appear(), dust_appear(), unchoke(), alchemy(), trap_look(), strangle(), | 964 void auto_save(int sig); |
| 965 ring_teleport(), ring_search(), grab(); | 965 char be_trapped(struct thing *th, coord *tc); |
| 966 bool blue_light(), can_blink(), creat_mons(), add_pack(), | 966 char *blesscurse(int flags); |
| 967 straight_shot(), maze_view(), lit_room(), getdelta(), save_file(), | 967 bool blue_light(bool blessed, bool cursed); |
| 968 save_game(); | 968 void bugkill(int sig); |
| 969 long check_level(); | 969 void buy_it(void); |
| 970 void byebye(int sig), genmonsters(); | 970 void byebye(int sig); |
| 971 int land(), undance(); | 971 void cast(void); |
| 972 bool can_blink(struct thing *tp); | |
| 973 coord *can_shoot(coord *er, coord *ee); | |
| 974 bool cansee(int y, int x); | |
| 975 void carry_obj(struct thing *mp, int chance); | |
| 976 long check_level(bool get_spells); | |
| 977 void check_residue(struct thing *tp); | |
| 978 void chg_str(int amt); | |
| 979 void command(void); | |
| 980 int const_bonus(void); | |
| 981 void corr_move(int dy, int dx); | |
| 982 struct linked_list *creat_item(void); | |
| 983 bool creat_mons(struct thing *person, short monster, bool report); | |
| 984 void create_obj(bool prompt, int which_item, int which_type); | |
| 985 void cur_null(struct object *op); | |
| 986 void cure_disease(void); | |
| 987 void dbotline(WINDOW *scr, char *message); | |
| 988 void death(short monst); | |
| 989 void del_pack(struct linked_list *item); | |
| 990 void destroy_item(struct linked_list *item); | |
| 991 int dex_compute(void); | |
| 992 int dext_prot(int dexterity); | |
| 993 bool diag_ok(coord *sp, coord *ep, struct thing *flgptr); | |
| 994 void dip_it(void); | |
| 995 void do_daemons(int flag); | |
| 996 void do_fuses(int flag); | |
| 997 void do_maze(void); | |
| 998 void do_motion(struct object *obj, int ydelta, int xdelta, struct thing *tp); | |
| 999 void do_move(int dy, int dx); | |
| 1000 void do_passages(void); | |
| 1001 void do_post(void); | |
| 1002 void do_rooms(void); | |
| 1003 void do_run(char ch); | |
| 1004 void do_terrain(int basey, int basex, int deltay, int deltax, bool fresh); | |
| 1005 bool do_zap(bool gotdir, int which, int flag); | |
| 1006 void doctor(struct thing *tp); | |
| 1007 void draw_room(struct room *rp); | |
| 1008 bool drop(struct linked_list *item); | |
| 1009 bool dropcheck(struct object *op); | |
| 1010 void dust_appear(void); | |
| 1011 void eat(void); | |
| 1012 int encread(char *start, unsigned int size, int inf); | |
| 1013 int encwrite(char *start, unsigned int size, FILE *outf); | |
| 1014 void endit(int sig); | |
| 1015 void endmsg(void); | |
| 1016 void extinguish(int (*func)()); | |
| 1017 void fall(struct linked_list *item, bool pr); | |
| 1018 coord *fallpos(coord *pos, bool be_clear, int range); | |
| 1019 void fatal(char *s); | |
| 1020 bool fight(coord *mp, struct object *weap, bool thrown); | |
| 1021 struct linked_list *find_mons(int y, int x); | |
| 1022 struct linked_list *find_obj(int y, int x); | |
| 1023 struct delayed_action *find_slot(int (*func)()); | |
| 1024 void fix_stick(struct object *cur); | |
| 1025 void fumble(void); | |
| 1026 void fuse(int (*func)(), void *arg, int time, int type); | |
| 1027 void genmonsters(int least, bool treas); | |
| 1028 bool get_dir(void); | |
| 1029 struct linked_list *get_item(struct linked_list *list, char *purpose, int type); | |
| 1030 int get_str(char *opt, WINDOW *win); | |
| 1031 int get_worth(struct object *obj); | |
| 1032 int getbless(void); | |
| 1033 int getdeath(void); | |
| 1034 bool getdelta(char match, int *dy, int *dx); | |
| 1035 int grab(int y, int x); | |
| 1036 void gsense(void); | |
| 1037 bool hit_monster(int y, int x, struct object *obj, struct thing *tp); | |
| 1038 int hitweight(void); | |
| 1039 short id_monst(char monster); | |
| 1040 void idenpack(void); | |
| 1041 void init_colors(void); | |
| 1042 void init_materials(void); | |
| 1043 void init_misc(void); | |
| 1044 void init_names(void); | |
| 1045 void init_player(void); | |
| 1046 void init_stones(void); | |
| 1047 void init_terrain(void); | |
| 1048 void init_things(void); | |
| 1049 void init_weapon(struct object *weap, char type); | |
| 1050 char *inv_name(struct object *obj, bool drop); | |
| 1051 bool inventory(struct linked_list *list, int type); | |
| 1052 bool is_current(struct object *obj); | |
| 1053 bool is_magic(struct object *obj); | |
| 1054 bool isatrap(char ch); | |
| 1055 int itemweight(struct object *wh); | |
| 1056 void kill_daemon(int (*func)()); | |
| 1057 void killed(struct linked_list *item, bool pr, bool points); | |
| 1058 void lake_check(coord *place); | |
| 1059 void land(void); | |
| 1060 void lengthen(int (*func)(), int xtime); | |
| 1061 void light(coord *cp); | |
| 1062 bool lit_room(struct room *rp); | |
| 1063 void look(bool wakeup, bool runend); | |
| 1064 void lower_level(short who); | |
| 1065 bool m_use_item(struct thing *monster, coord *monst_pos, coord *defend_pos); | |
| 1066 short makemonster(bool create); | |
| 1067 bool maze_view(int y, int x); | |
| 1068 char *misc_name(struct object *obj); | |
| 1069 void missile(int ydelta, int xdelta, struct linked_list *item, | |
| 1070 struct thing *tp); | |
| 1071 void msg(char *fmt, ...); | |
| 1072 unsigned long netread(int *error, int size, FILE *stream); | |
| 1073 int netwrite(unsigned long value, int size, FILE *stream); | |
| 1074 char *new(int size); | |
| 1075 struct linked_list *new_item(int size); | |
| 1076 void new_level(LEVTYPE ltype); | |
| 1077 void new_monster(struct linked_list *item, short type, coord *cp, | |
| 1078 bool max_monster); | |
| 1079 struct linked_list *new_thing(int thing_type); | |
| 1080 void nohaste(void); | |
| 1081 void noslow(void); | |
| 1082 char *num(int n1, int n2); | |
| 1083 void o_discard(struct linked_list *item); | |
| 1084 void option(void); | |
| 1085 char pack_char(struct linked_list *list, struct object *obj); | |
| 1086 void parse_opts(char *str); | |
| 1087 bool passwd(void); | |
| 1088 int pick_one(struct magic_item *magic, int nitems); | |
| 1089 void pick_up(char ch); | |
| 1090 void picky_inven(void); | |
| 1091 void playit(void); | |
| 1092 void pray(void); | |
| 1093 bool price_it(void); | |
| 1094 void quaff(int which, int flag, bool is_potion); | |
| 1095 void quit(int sig); | |
| 1096 void raise_level(bool get_spells); | |
| 1097 short randmonster(bool wander, bool no_unique); | |
| 1098 void read_scroll(int which, int flag, bool is_scroll); | |
| 1099 int readchar(void); | |
| 1100 void res_dexterity(int howmuch); | |
| 1101 void res_strength(void); | |
| 1102 bool restore(char *file, char **envp); | |
| 1103 void restscr(WINDOW *scr); | |
| 1104 int ring_eat(int hand); | |
| 1105 char *ring_num(struct object *obj); | |
| 1106 void ring_on(struct object *obj); | |
| 1107 void ring_search(void); | |
| 1108 void ring_teleport(void); | |
| 1109 int ring_value(int type); | |
| 1110 int rnd(int range); | |
| 1111 void rnd_pos(struct room *rp, coord *cp); | |
| 1112 int rnd_room(void); | |
| 1113 coord *rndmove(struct thing *who); | |
| 1114 int roll(int number, int sides); | |
| 1115 void rollwand(void); | |
| 1116 struct room *roomin(coord *cp); | |
| 1117 int rs_restore_file(int inf); | |
| 1118 int rs_save_file(FILE *savef); | |
| 1119 void runners(void); | |
| 1120 void runto(struct thing *runner, coord *spot); | |
| 1121 bool save(int which, struct thing *who, int adj); | |
| 1122 bool save_game(void); | |
| 1123 void score(unsigned long amount, int flags, short monst); | |
| 1124 void search(bool is_thief, bool door_chime); | |
| 1125 char secretdoor(int y, int x); | |
| 1126 void sell(struct thing *tp); | |
| 1127 void sell_it(void); | |
| 1128 void set_trap(struct thing *tp, int y, int x); | |
| 1129 void setup(void); | |
| 1130 bool shoot_bolt(struct thing *shooter, coord start, coord dir, | |
| 1131 bool get_points, short reason, char *name, int damage); | |
| 1132 bool shoot_ok(char ch); | |
| 1133 char show(int y, int x); | |
| 1134 void sight(void); | |
| 1135 struct linked_list *spec_item(int type, int which, int hit, int damage); | |
| 1136 void start_daemon(int (*func)(), void *arg, int type); | |
| 1137 void status(bool display); | |
| 1138 void steal(void); | |
| 1139 bool step_ok(int y, int x, int can_on_monst, struct thing *flgptr); | |
| 1140 void stomach(void); | |
| 1141 int str_compute(void); | |
| 1142 void strangle(void); | |
| 1143 void strucpy(char *s1, char *s2, int len); | |
| 1144 void suffocate(void); | |
| 1145 void swander(void); | |
| 1146 bool swing(short class, int at_lvl, int op_arm, int wplus); | |
| 1147 void t_discard(struct linked_list *item); | |
| 1148 void take_off(void); | |
| 1149 int teleport(void); | |
| 1150 void total_winner(void); | |
| 1151 int totalenc(void); | |
| 1152 char *tr_name(char ch); | |
| 1153 struct trap *trap_at(int y, int x); | |
| 1154 void trap_look(void); | |
| 1155 void un_itch(void); | |
| 1156 void unchoke(void); | |
| 1157 void unclrhead(void); | |
| 1158 void unconfuse(void); | |
| 1159 void undance(void); | |
| 1160 void unphase(void); | |
| 1161 void unsee(void); | |
| 1162 void unstink(void); | |
| 1163 void updpack(bool getmax); | |
| 1164 void use_mm(int which); | |
| 1165 char *vowelstr(char *str); | |
| 1166 void wait_for(WINDOW *win, char ch); | |
| 1167 struct linked_list *wake_monster(int y, int x); | |
| 1168 void waste_time(void); | |
| 1169 char *weap_name(struct object *obj); | |
| 1170 void wear(void); | |
| 1171 void wghtchk(void); | |
| 1172 void whatis(struct linked_list *what); | |
| 1173 void wield(void); | |
| 972 void writelog(unsigned long amount, int flags, short monst); | 1174 void writelog(unsigned long amount, int flags, short monst); |
| 1175 | |
| 973 #ifdef CHECKTIME | 1176 #ifdef CHECKTIME |
| 974 int checkout(); | 1177 int checkout(); |
| 975 #endif | 1178 #endif |
| 976 extern char *md_getusername(); | 1179 extern char *md_getusername(void); |
| 977 extern char *md_gethomedir(); | 1180 extern char *md_gethomedir(void); |
| 978 extern void md_flushinp(); | 1181 extern void md_flushinp(void); |
| 979 extern char *md_getshell(); | 1182 extern char *md_getshell(void); |
| 980 extern char *md_gethostname(); | 1183 extern char *md_gethostname(void); |
| 981 extern void md_dobinaryio(); | 1184 extern char *md_getpass(char *prompt); |
| 982 extern char *md_getpass(); | 1185 extern char *md_crypt(char *key, char *salt); |
| 983 extern char *md_crypt(); | 1186 extern char *md_getroguedir(void); |
| 984 extern char *md_getroguedir(); | 1187 extern void md_init(void); |
| 985 extern void md_init(); | |
| 986 extern FILE * md_fdopen(int fd, char *mode); | 1188 extern FILE * md_fdopen(int fd, char *mode); |
| 987 extern int md_unlink(char *file); | 1189 extern int md_unlink(char *file); |
| 1190 extern int md_normaluser(void); | |
| 1191 extern int md_getuid(void); | |
| 1192 extern long md_memused(void); | |
| 1193 extern void md_reopen_score(void); | |
| 1194 extern int md_readchar(WINDOW *win); | |
| 1195 extern int md_shellescape(void); | |
| 1196 extern int md_srand(int seed); | |
| 1197 extern int md_rand(void); | |
| 1198 extern int md_erasechar(void); | |
| 1199 extern int md_killchar(void); | |
| 988 | 1200 |
| 989 /* | 1201 /* |
| 990 * Now all the global variables | 1202 * Now all the global variables |
| 991 */ | 1203 */ |
| 992 | 1204 |
