Mercurial > hg > early-roguelike
diff xrogue/rogue.h @ 220:f54901b9c39b
XRogue: convert to ANSI-style function declarations.
author | John "Elwin" Edwards |
---|---|
date | Wed, 02 Mar 2016 21:13:26 -0500 |
parents | 3e1146666ae5 |
children | b67b99f6c92b |
line wrap: on
line diff
--- a/xrogue/rogue.h Fri Feb 19 21:02:28 2016 -0500 +++ b/xrogue/rogue.h Wed Mar 02 21:13:26 2016 -0500 @@ -1222,54 +1222,296 @@ /* * Other structures */ - -struct linked_list *find_mons(), *find_obj(), *get_item(), *new_item(), - *new_thing(), *wake_monster(), *get_hurl(), *spec_item(), - *creat_item(), *wield_weap(); - -struct room *roomin(); -struct trap *trap_at(); - -char *getenv(), *tr_name(), *new(), *vowelstr(), - *inv_name(), *num(), - *ring_num(), *misc_num(), *blesscurse(), *p_kind(), *typ_name(), - *prname(), *monster_name(), *weap_name(); - -coord rndmove(), *fallpos(), *doorway(), get_coordinates(); -int can_shoot(),misc_name(); - -short randmonster(), id_monst(), movement(); -int bugkill(), nohaste(), spell_recovery(), doctor(), runners(), swander(), - unconfuse(), unsee(), fumble(), unclrhead(), unphase(), noslow(), - rollwand(), stomach(), sight(), unstink(), suffocate(), cure_disease(), - shoot_bolt(), changeclass(), appear(), dust_appear(), unchoke(), - alchemy(), trap_look(), strangle(), ring_teleport(), ring_search(), - grab(), dsrpt_player(), quill_charge(), make_sell_pack(), unskill(), - findmindex(), nobolt(), nofire(), nocold(), usage_time(), eat_gold(), - chant_recovery(), prayer_recovery(), dsrpt_monster(), opt_player(); - -bool blue_light(), can_blink(), creat_mons(), add_pack(), invisible(), - straight_shot(), maze_view(), lit_room(), getdelta(), save_file(), - save_game(), m_use_it(), m_use_pack(), get_dir(), need_dir(),passwd(); +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 _r_free_fire_list(struct linked_list **ptr); +void _r_free_list(struct linked_list **ptr); +void _t_free_list(struct linked_list **ptr); +int ac_compute(bool ignoremetal); +void activity(void); +bool add_pack(struct linked_list *item, bool silent); +void add_slow(void); +void addmsg(char *fmt, ...); +void affect(void); +void aggravate(bool do_uniques, bool do_good); +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); +bool blue_light(bool blessed, bool cursed); +void buy_it(void); +void byebye(int sig); +bool can_blink(struct thing *tp); +int can_shoot(coord *er, coord *ee, coord *shoot_dir); +bool cansee(int y, int x); +void carry_obj(struct thing *mp, int chance); +void cast(void); +void changeclass(long *newclass); +void chant(void); +void chant_recovery(void); +void chase(struct thing *tp, coord *ee, struct room *rer, struct room *ree, + bool flee); +long check_level(void); +void check_residue(struct thing *tp); +void chg_str(int amt); +void choose_qst(void); +int cloak_charge(struct object *obj); +void command(void); +void confus_player(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_plus(int dexterity); +int dext_prot(int dexterity); +bool diag_ok(coord *sp, coord *ep, struct thing *flgptr); +void dip_it(void); +void do_chase(struct thing *th); +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_panic(int who); +void do_passages(void); +void do_post(bool startup); +void do_rooms(void); +void do_run(char ch); +void do_teleport(void); +void do_terrain(int basey, int basex, int deltay, int deltax, bool fresh); +void do_zap(struct thing *zapper, struct object *obj, coord *direction, + int which, int flags); +void doctor(struct thing *tp); +coord *doorway(struct room *rp, coord *door); +void draw_room(struct room *rp); +bool drop(struct linked_list *item); +bool dropcheck(struct object *op); +void dsrpt_monster(struct thing *tp, bool always, bool see_him); +void dsrpt_player(void); +void dust_appear(void); +void eat(void); +void eat_gold(struct object *obj); +int effect(struct thing *att, struct thing *def, struct object *weap, + bool thrown, bool see_att, bool see_def); +long encread(char *start, unsigned long size, int inf); +long encwrite(char *start, unsigned long size, FILE *outf); +void endit(int sig); +void endmsg(void); +void exit_game(int flag); +void explode(struct thing *tp); +void extinguish(int (*dfunc)()); +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)()); +int findmindex(char *name); +void fix_stick(struct object *cur); +void fright(struct thing *th); +void fumble(void); +void fuse(int (*dfunc)(), VOID *arg, int time, int type); +void genmonsters(int least, bool treas); +coord get_coordinates(void); +bool get_dir(coord *direction); +struct linked_list *get_hurl(struct thing *tp); +struct linked_list *get_item(struct linked_list *list, char *purpose, int type, + bool askfirst, bool showcost); +int get_str(char *opt, WINDOW *win); +long get_worth(struct object *obj); +int getdeath(void); +bool getdelta(char match, int *dy, int *dx); +void give(struct thing *th); +int grab(int y, int x); +void gsense(void); +void help(void); +bool hit_monster(int y, int x, struct object *obj, struct thing *tp); +int hitweight(void); +void idenpack(void); +void ident_hero(void); +void identify(unsigned char ch); +void init_colors(void); +void init_foods(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 invisible(struct thing *monst); +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 (*dfunc)()); +void killed(struct linked_list *item, bool pr, bool points, bool treasure); +int land(void); +void lengthen(int (*dfunc)(), int xtime); +void light(coord *cp); +bool lit_room(struct room *rp); +void look(bool wakeup, bool runend); +void lower_level(short who); +void m_use_relic(struct thing *monster); +void m_use_wand(struct thing *monster); +void make_sell_pack(struct thing *tp); +short makemonster(bool showall, char *action); +bool maze_view(int y, int x); +int misc_name(char *str, struct object *obj); +void missile(int ydelta, int xdelta, struct linked_list *item, + struct thing *tp); +char *monster_name(struct thing *tp); +bool move_hero(int why); +short movement(struct thing *tp); +void msg(char *fmt, ...); +void nameitem(struct linked_list *item, bool mark); +bool need_dir(int type, int which); +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, bool allow_curse); +void nobolt(void); +void nocold(void); +void nofire(void); +void nohaste(void); +void noslow(void); +char *num(int n1, int n2); +void o_discard(struct linked_list *item); +void opt_player(void); +void option(void); +void over_win(WINDOW *oldwin, WINDOW *newin, int maxy, int maxx, int cursory, + int cursorx, char redraw); +char pack_char(struct linked_list *list, struct object *obj); +void parse_opts(char *str); +bool passwd(void); +void picky_inven(void); +bool player_zap(int which, int flag); +void playit(void); +void pray(void); +void prayer_recovery(void); +bool price_it(void); +char *prname(char *who, bool upper); +void quaff(int which, int kind, int flags, bool is_potion); +void quill_charge(void); +void quit(int sig); +void raise_level(void); +short randmonster(bool wander, bool no_unique); +void read_scroll(int which, int flag, bool is_scroll); +void reap(void); +int res_strength(long howmuch); +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 linked_list *item); +void ring_search(void); +void ring_teleport(void); +int ring_value(int type); +void rmmsg(void); +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 runners(int segments); +void runto(struct thing *runner, coord *spot); +bool save(int which, struct thing *who, int adj); +bool save_game(void); +char secretdoor(int y, int x); +void score(unsigned long amount, int flags, short monst); +void search(bool is_thief, bool door_chime); +void sell(struct thing *tp); +void sell_it(void); +void set_trap(struct thing *tp, int y, int x); +void setup(void); +void shoot_bolt(struct thing *shooter, coord start, coord dir, + bool get_points, short reason, char *name, int damage); +bool shoot_ok(int ch); +char show(int y, int x); +void sight(void); +bool skirmish(struct thing *attacker, coord *mp, struct object *weap, + bool thrown); +struct linked_list *spec_item(int type, int which, int hit, int damage); +void spell_recovery(void); +void start_daemon(int (*dfunc)(), 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); +int str_plus(short str); +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 take_off(void); +void take_with(void); +void teleport(void); +void total_winner(void); +int totalenc(struct thing *tp); +char *tr_name(char ch); +struct trap *trap_at(int y, int x); +void trap_look(void); +void unchoke(void); +void unclrhead(void); +void unconfuse(void); +int undance(void); +void unphase(void); +void unsee(void); +void unskill(void); +void unstink(void); +void updpack(int getmax, struct thing *tp); +int usage_time(struct linked_list *item); +void use_mm(int which); +char *vowelstr(char *str); +void wait_for(char ch); +struct linked_list *wake_monster(int y, int x); +void wake_room(struct room *rp); +void wanderer(void); +void waste_time(void); +int weap_move(struct thing *wielder, struct object *weap); +char *weap_name(struct object *obj); +void wear(void); +void wghtchk(void); +void whatis(struct linked_list *what); +void wield(void); +struct linked_list *wield_weap(struct object *thrown, struct thing *mp); +void writelog(unsigned long amount, int flags, short monst); +void xsense(void); -long check_level(); -long encread(); -long get_worth(); -long encwrite(); +char *getenv(), *misc_num(); -void byebye(int sig), genmonsters(), quit(int sig), - auto_save(int sig), endit(int sig), tstp(); +int usage_time(); + +void tstp(); -void teleport(); - -void writelog(unsigned long amount, int flags, short monst); - -int undance(), land(), cloak_charge(), wghtchk(); - -int add_intelligence(), add_strength(), add_wisdom(), add_dexterity(), - add_constitution(), add_charisma(), res_intelligence(), res_strength(), - res_wisdom(), res_dexterity(), res_constitution(), res_charisma(); +int md_getuid(void); +long md_memused(void); +int md_normaluser(void); +int md_rand(int range); +void md_setup(void); +int md_shellescape(void); +int md_srand(int seed); /* * Now all the global variables @@ -1405,7 +1647,7 @@ extern FILE *scorefi; extern FILE *logfile; extern LEVTYPE levtype; -extern int (*add_abil[NUMABILITIES])(); /* Functions to change abilities */ +extern int (*add_abil[NUMABILITIES])(int); /* Functions to change abilities */ extern int (*res_abil[NUMABILITIES])(); /* Functions to change abilities */ extern int mf_count; /* move_free counter - see actions.c(m_act()) */ extern int mf_jmpcnt; /* move_free counter for # of jumps */