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.
This commit is contained in:
parent
59f448e92e
commit
f38b2223c8
37 changed files with 977 additions and 733 deletions
284
arogue5/rogue.h
284
arogue5/rogue.h
|
|
@ -943,48 +943,260 @@ struct spells {
|
|||
int s_flag; /* is the spell blessed/cursed? */
|
||||
};
|
||||
|
||||
struct linked_list *find_mons(), *find_obj(), *get_item(), *new_item(),
|
||||
*new_thing(), *wake_monster(), *get_hurl(),
|
||||
*spec_item(), *creat_item();
|
||||
struct object *wield_weap();
|
||||
struct room *roomin();
|
||||
struct trap *trap_at();
|
||||
|
||||
char *tr_name(), *new(),
|
||||
*vowelstr(), *inv_name(),
|
||||
*ctime(), *num(), *ring_num(), *misc_num(), *blesscurse(), *typ_name(),
|
||||
*weap_name(), *misc_name();
|
||||
coord *rndmove(), *can_shoot(), *fallpos();
|
||||
short randmonster(), id_monst();
|
||||
void quit(int sig), tstp(int sig), auto_save(int sig), bugkill(int sig), endit(int sig);
|
||||
int rnd(), wghtchk(), nohaste(), res_strength(),
|
||||
doctor(), runners(), swander(), unconfuse(), unsee(), fumble(),
|
||||
unclrhead(), unphase(), noslow(), rollwand(), stomach(), sight(),
|
||||
unstink(), suffocate(), cure_disease(), un_itch(), shoot_bolt(),
|
||||
appear(), dust_appear(), unchoke(), alchemy(), trap_look(), strangle(),
|
||||
ring_teleport(), ring_search(), grab();
|
||||
bool blue_light(), can_blink(), creat_mons(), add_pack(),
|
||||
straight_shot(), maze_view(), lit_room(), getdelta(), save_file(),
|
||||
save_game();
|
||||
long check_level();
|
||||
void byebye(int sig), genmonsters();
|
||||
int land(), undance();
|
||||
void _attach(struct linked_list **list, struct linked_list *item);
|
||||
void _detach(struct linked_list **list, struct linked_list *item);
|
||||
void _o_free_list(struct linked_list **ptr);
|
||||
void _t_free_list(struct linked_list **ptr);
|
||||
int ac_compute(void);
|
||||
void activity(void);
|
||||
void add_dexterity(bool cursed);
|
||||
void add_intelligence(bool cursed);
|
||||
bool add_pack(struct linked_list *item, bool silent,
|
||||
struct linked_list **packret);
|
||||
void add_slow(void);
|
||||
void add_wisdom(bool cursed);
|
||||
void addmsg(char *fmt, ...);
|
||||
void affect(void);
|
||||
void aggravate(void);
|
||||
void alchemy(struct object *obj);
|
||||
void appear(void);
|
||||
bool attack(struct thing *mp, struct object *weapon, bool thrown);
|
||||
void auto_save(int sig);
|
||||
char be_trapped(struct thing *th, coord *tc);
|
||||
char *blesscurse(int flags);
|
||||
bool blue_light(bool blessed, bool cursed);
|
||||
void bugkill(int sig);
|
||||
void buy_it(void);
|
||||
void byebye(int sig);
|
||||
void cast(void);
|
||||
bool can_blink(struct thing *tp);
|
||||
coord *can_shoot(coord *er, coord *ee);
|
||||
bool cansee(int y, int x);
|
||||
void carry_obj(struct thing *mp, int chance);
|
||||
long check_level(bool get_spells);
|
||||
void check_residue(struct thing *tp);
|
||||
void chg_str(int amt);
|
||||
void command(void);
|
||||
int const_bonus(void);
|
||||
void corr_move(int dy, int dx);
|
||||
struct linked_list *creat_item(void);
|
||||
bool creat_mons(struct thing *person, short monster, bool report);
|
||||
void create_obj(bool prompt, int which_item, int which_type);
|
||||
void cur_null(struct object *op);
|
||||
void cure_disease(void);
|
||||
void dbotline(WINDOW *scr, char *message);
|
||||
void death(short monst);
|
||||
void del_pack(struct linked_list *item);
|
||||
void destroy_item(struct linked_list *item);
|
||||
int dex_compute(void);
|
||||
int dext_prot(int dexterity);
|
||||
bool diag_ok(coord *sp, coord *ep, struct thing *flgptr);
|
||||
void dip_it(void);
|
||||
void do_daemons(int flag);
|
||||
void do_fuses(int flag);
|
||||
void do_maze(void);
|
||||
void do_motion(struct object *obj, int ydelta, int xdelta, struct thing *tp);
|
||||
void do_move(int dy, int dx);
|
||||
void do_passages(void);
|
||||
void do_post(void);
|
||||
void do_rooms(void);
|
||||
void do_run(char ch);
|
||||
void do_terrain(int basey, int basex, int deltay, int deltax, bool fresh);
|
||||
bool do_zap(bool gotdir, int which, int flag);
|
||||
void doctor(struct thing *tp);
|
||||
void draw_room(struct room *rp);
|
||||
bool drop(struct linked_list *item);
|
||||
bool dropcheck(struct object *op);
|
||||
void dust_appear(void);
|
||||
void eat(void);
|
||||
int encread(char *start, unsigned int size, int inf);
|
||||
int encwrite(char *start, unsigned int size, FILE *outf);
|
||||
void endit(int sig);
|
||||
void endmsg(void);
|
||||
void extinguish(int (*func)());
|
||||
void fall(struct linked_list *item, bool pr);
|
||||
coord *fallpos(coord *pos, bool be_clear, int range);
|
||||
void fatal(char *s);
|
||||
bool fight(coord *mp, struct object *weap, bool thrown);
|
||||
struct linked_list *find_mons(int y, int x);
|
||||
struct linked_list *find_obj(int y, int x);
|
||||
struct delayed_action *find_slot(int (*func)());
|
||||
void fix_stick(struct object *cur);
|
||||
void fumble(void);
|
||||
void fuse(int (*func)(), void *arg, int time, int type);
|
||||
void genmonsters(int least, bool treas);
|
||||
bool get_dir(void);
|
||||
struct linked_list *get_item(struct linked_list *list, char *purpose, int type);
|
||||
int get_str(char *opt, WINDOW *win);
|
||||
int get_worth(struct object *obj);
|
||||
int getbless(void);
|
||||
int getdeath(void);
|
||||
bool getdelta(char match, int *dy, int *dx);
|
||||
int grab(int y, int x);
|
||||
void gsense(void);
|
||||
bool hit_monster(int y, int x, struct object *obj, struct thing *tp);
|
||||
int hitweight(void);
|
||||
short id_monst(char monster);
|
||||
void idenpack(void);
|
||||
void init_colors(void);
|
||||
void init_materials(void);
|
||||
void init_misc(void);
|
||||
void init_names(void);
|
||||
void init_player(void);
|
||||
void init_stones(void);
|
||||
void init_terrain(void);
|
||||
void init_things(void);
|
||||
void init_weapon(struct object *weap, char type);
|
||||
char *inv_name(struct object *obj, bool drop);
|
||||
bool inventory(struct linked_list *list, int type);
|
||||
bool is_current(struct object *obj);
|
||||
bool is_magic(struct object *obj);
|
||||
bool isatrap(char ch);
|
||||
int itemweight(struct object *wh);
|
||||
void kill_daemon(int (*func)());
|
||||
void killed(struct linked_list *item, bool pr, bool points);
|
||||
void lake_check(coord *place);
|
||||
void land(void);
|
||||
void lengthen(int (*func)(), int xtime);
|
||||
void light(coord *cp);
|
||||
bool lit_room(struct room *rp);
|
||||
void look(bool wakeup, bool runend);
|
||||
void lower_level(short who);
|
||||
bool m_use_item(struct thing *monster, coord *monst_pos, coord *defend_pos);
|
||||
short makemonster(bool create);
|
||||
bool maze_view(int y, int x);
|
||||
char *misc_name(struct object *obj);
|
||||
void missile(int ydelta, int xdelta, struct linked_list *item,
|
||||
struct thing *tp);
|
||||
void msg(char *fmt, ...);
|
||||
unsigned long netread(int *error, int size, FILE *stream);
|
||||
int netwrite(unsigned long value, int size, FILE *stream);
|
||||
char *new(int size);
|
||||
struct linked_list *new_item(int size);
|
||||
void new_level(LEVTYPE ltype);
|
||||
void new_monster(struct linked_list *item, short type, coord *cp,
|
||||
bool max_monster);
|
||||
struct linked_list *new_thing(int thing_type);
|
||||
void nohaste(void);
|
||||
void noslow(void);
|
||||
char *num(int n1, int n2);
|
||||
void o_discard(struct linked_list *item);
|
||||
void option(void);
|
||||
char pack_char(struct linked_list *list, struct object *obj);
|
||||
void parse_opts(char *str);
|
||||
bool passwd(void);
|
||||
int pick_one(struct magic_item *magic, int nitems);
|
||||
void pick_up(char ch);
|
||||
void picky_inven(void);
|
||||
void playit(void);
|
||||
void pray(void);
|
||||
bool price_it(void);
|
||||
void quaff(int which, int flag, bool is_potion);
|
||||
void quit(int sig);
|
||||
void raise_level(bool get_spells);
|
||||
short randmonster(bool wander, bool no_unique);
|
||||
void read_scroll(int which, int flag, bool is_scroll);
|
||||
int readchar(void);
|
||||
void res_dexterity(int howmuch);
|
||||
void res_strength(void);
|
||||
bool restore(char *file, char **envp);
|
||||
void restscr(WINDOW *scr);
|
||||
int ring_eat(int hand);
|
||||
char *ring_num(struct object *obj);
|
||||
void ring_on(struct object *obj);
|
||||
void ring_search(void);
|
||||
void ring_teleport(void);
|
||||
int ring_value(int type);
|
||||
int rnd(int range);
|
||||
void rnd_pos(struct room *rp, coord *cp);
|
||||
int rnd_room(void);
|
||||
coord *rndmove(struct thing *who);
|
||||
int roll(int number, int sides);
|
||||
void rollwand(void);
|
||||
struct room *roomin(coord *cp);
|
||||
int rs_restore_file(int inf);
|
||||
int rs_save_file(FILE *savef);
|
||||
void runners(void);
|
||||
void runto(struct thing *runner, coord *spot);
|
||||
bool save(int which, struct thing *who, int adj);
|
||||
bool save_game(void);
|
||||
void score(unsigned long amount, int flags, short monst);
|
||||
void search(bool is_thief, bool door_chime);
|
||||
char secretdoor(int y, int x);
|
||||
void sell(struct thing *tp);
|
||||
void sell_it(void);
|
||||
void set_trap(struct thing *tp, int y, int x);
|
||||
void setup(void);
|
||||
bool shoot_bolt(struct thing *shooter, coord start, coord dir,
|
||||
bool get_points, short reason, char *name, int damage);
|
||||
bool shoot_ok(char ch);
|
||||
char show(int y, int x);
|
||||
void sight(void);
|
||||
struct linked_list *spec_item(int type, int which, int hit, int damage);
|
||||
void start_daemon(int (*func)(), void *arg, int type);
|
||||
void status(bool display);
|
||||
void steal(void);
|
||||
bool step_ok(int y, int x, int can_on_monst, struct thing *flgptr);
|
||||
void stomach(void);
|
||||
int str_compute(void);
|
||||
void strangle(void);
|
||||
void strucpy(char *s1, char *s2, int len);
|
||||
void suffocate(void);
|
||||
void swander(void);
|
||||
bool swing(short class, int at_lvl, int op_arm, int wplus);
|
||||
void t_discard(struct linked_list *item);
|
||||
void take_off(void);
|
||||
int teleport(void);
|
||||
void total_winner(void);
|
||||
int totalenc(void);
|
||||
char *tr_name(char ch);
|
||||
struct trap *trap_at(int y, int x);
|
||||
void trap_look(void);
|
||||
void un_itch(void);
|
||||
void unchoke(void);
|
||||
void unclrhead(void);
|
||||
void unconfuse(void);
|
||||
void undance(void);
|
||||
void unphase(void);
|
||||
void unsee(void);
|
||||
void unstink(void);
|
||||
void updpack(bool getmax);
|
||||
void use_mm(int which);
|
||||
char *vowelstr(char *str);
|
||||
void wait_for(WINDOW *win, char ch);
|
||||
struct linked_list *wake_monster(int y, int x);
|
||||
void waste_time(void);
|
||||
char *weap_name(struct object *obj);
|
||||
void wear(void);
|
||||
void wghtchk(void);
|
||||
void whatis(struct linked_list *what);
|
||||
void wield(void);
|
||||
void writelog(unsigned long amount, int flags, short monst);
|
||||
|
||||
#ifdef CHECKTIME
|
||||
int checkout();
|
||||
#endif
|
||||
extern char *md_getusername();
|
||||
extern char *md_gethomedir();
|
||||
extern void md_flushinp();
|
||||
extern char *md_getshell();
|
||||
extern char *md_gethostname();
|
||||
extern void md_dobinaryio();
|
||||
extern char *md_getpass();
|
||||
extern char *md_crypt();
|
||||
extern char *md_getroguedir();
|
||||
extern void md_init();
|
||||
extern char *md_getusername(void);
|
||||
extern char *md_gethomedir(void);
|
||||
extern void md_flushinp(void);
|
||||
extern char *md_getshell(void);
|
||||
extern char *md_gethostname(void);
|
||||
extern char *md_getpass(char *prompt);
|
||||
extern char *md_crypt(char *key, char *salt);
|
||||
extern char *md_getroguedir(void);
|
||||
extern void md_init(void);
|
||||
extern FILE * md_fdopen(int fd, char *mode);
|
||||
extern int md_unlink(char *file);
|
||||
extern int md_normaluser(void);
|
||||
extern int md_getuid(void);
|
||||
extern long md_memused(void);
|
||||
extern void md_reopen_score(void);
|
||||
extern int md_readchar(WINDOW *win);
|
||||
extern int md_shellescape(void);
|
||||
extern int md_srand(int seed);
|
||||
extern int md_rand(void);
|
||||
extern int md_erasechar(void);
|
||||
extern int md_killchar(void);
|
||||
|
||||
/*
|
||||
* Now all the global variables
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue