Mercurial > hg > early-roguelike
comparison 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 |
comparison
equal
deleted
inserted
replaced
219:f9ef86cf22b2 | 220:f54901b9c39b |
---|---|
1220 }; | 1220 }; |
1221 | 1221 |
1222 /* | 1222 /* |
1223 * Other structures | 1223 * Other structures |
1224 */ | 1224 */ |
1225 | 1225 |
1226 struct linked_list *find_mons(), *find_obj(), *get_item(), *new_item(), | 1226 void _attach(struct linked_list **list, struct linked_list *item); |
1227 *new_thing(), *wake_monster(), *get_hurl(), *spec_item(), | 1227 void _detach(struct linked_list **list, struct linked_list *item); |
1228 *creat_item(), *wield_weap(); | 1228 void _o_free_list(struct linked_list **ptr); |
1229 | 1229 void _r_free_fire_list(struct linked_list **ptr); |
1230 struct room *roomin(); | 1230 void _r_free_list(struct linked_list **ptr); |
1231 struct trap *trap_at(); | 1231 void _t_free_list(struct linked_list **ptr); |
1232 | 1232 int ac_compute(bool ignoremetal); |
1233 char *getenv(), *tr_name(), *new(), *vowelstr(), | 1233 void activity(void); |
1234 *inv_name(), *num(), | 1234 bool add_pack(struct linked_list *item, bool silent); |
1235 *ring_num(), *misc_num(), *blesscurse(), *p_kind(), *typ_name(), | 1235 void add_slow(void); |
1236 *prname(), *monster_name(), *weap_name(); | 1236 void addmsg(char *fmt, ...); |
1237 | 1237 void affect(void); |
1238 coord rndmove(), *fallpos(), *doorway(), get_coordinates(); | 1238 void aggravate(bool do_uniques, bool do_good); |
1239 int can_shoot(),misc_name(); | 1239 void alchemy(struct object *obj); |
1240 | 1240 void appear(void); |
1241 short randmonster(), id_monst(), movement(); | 1241 bool attack(struct thing *mp, struct object *weapon, bool thrown); |
1242 | 1242 void auto_save(int sig); |
1243 int bugkill(), nohaste(), spell_recovery(), doctor(), runners(), swander(), | 1243 char be_trapped(struct thing *th, coord *tc); |
1244 unconfuse(), unsee(), fumble(), unclrhead(), unphase(), noslow(), | 1244 bool blue_light(bool blessed, bool cursed); |
1245 rollwand(), stomach(), sight(), unstink(), suffocate(), cure_disease(), | 1245 void buy_it(void); |
1246 shoot_bolt(), changeclass(), appear(), dust_appear(), unchoke(), | 1246 void byebye(int sig); |
1247 alchemy(), trap_look(), strangle(), ring_teleport(), ring_search(), | 1247 bool can_blink(struct thing *tp); |
1248 grab(), dsrpt_player(), quill_charge(), make_sell_pack(), unskill(), | 1248 int can_shoot(coord *er, coord *ee, coord *shoot_dir); |
1249 findmindex(), nobolt(), nofire(), nocold(), usage_time(), eat_gold(), | 1249 bool cansee(int y, int x); |
1250 chant_recovery(), prayer_recovery(), dsrpt_monster(), opt_player(); | 1250 void carry_obj(struct thing *mp, int chance); |
1251 | 1251 void cast(void); |
1252 bool blue_light(), can_blink(), creat_mons(), add_pack(), invisible(), | 1252 void changeclass(long *newclass); |
1253 straight_shot(), maze_view(), lit_room(), getdelta(), save_file(), | 1253 void chant(void); |
1254 save_game(), m_use_it(), m_use_pack(), get_dir(), need_dir(),passwd(); | 1254 void chant_recovery(void); |
1255 | 1255 void chase(struct thing *tp, coord *ee, struct room *rer, struct room *ree, |
1256 long check_level(); | 1256 bool flee); |
1257 long encread(); | 1257 long check_level(void); |
1258 long get_worth(); | 1258 void check_residue(struct thing *tp); |
1259 long encwrite(); | 1259 void chg_str(int amt); |
1260 | 1260 void choose_qst(void); |
1261 void byebye(int sig), genmonsters(), quit(int sig), | 1261 int cloak_charge(struct object *obj); |
1262 auto_save(int sig), endit(int sig), tstp(); | 1262 void command(void); |
1263 | 1263 void confus_player(void); |
1264 void teleport(); | 1264 int const_bonus(void); |
1265 | 1265 void corr_move(int dy, int dx); |
1266 void writelog(unsigned long amount, int flags, short monst); | 1266 struct linked_list *creat_item(void); |
1267 | 1267 bool creat_mons(struct thing *person, short monster, bool report); |
1268 int undance(), land(), cloak_charge(), wghtchk(); | 1268 void create_obj(bool prompt, int which_item, int which_type); |
1269 | 1269 void cur_null(struct object *op); |
1270 int add_intelligence(), add_strength(), add_wisdom(), add_dexterity(), | 1270 void cure_disease(void); |
1271 add_constitution(), add_charisma(), res_intelligence(), res_strength(), | 1271 void dbotline(WINDOW *scr, char *message); |
1272 res_wisdom(), res_dexterity(), res_constitution(), res_charisma(); | 1272 void death(short monst); |
1273 void del_pack(struct linked_list *item); | |
1274 void destroy_item(struct linked_list *item); | |
1275 int dex_compute(void); | |
1276 int dext_plus(int dexterity); | |
1277 int dext_prot(int dexterity); | |
1278 bool diag_ok(coord *sp, coord *ep, struct thing *flgptr); | |
1279 void dip_it(void); | |
1280 void do_chase(struct thing *th); | |
1281 void do_daemons(int flag); | |
1282 void do_fuses(int flag); | |
1283 void do_maze(void); | |
1284 void do_motion(struct object *obj, int ydelta, int xdelta, struct thing *tp); | |
1285 void do_move(int dy, int dx); | |
1286 void do_panic(int who); | |
1287 void do_passages(void); | |
1288 void do_post(bool startup); | |
1289 void do_rooms(void); | |
1290 void do_run(char ch); | |
1291 void do_teleport(void); | |
1292 void do_terrain(int basey, int basex, int deltay, int deltax, bool fresh); | |
1293 void do_zap(struct thing *zapper, struct object *obj, coord *direction, | |
1294 int which, int flags); | |
1295 void doctor(struct thing *tp); | |
1296 coord *doorway(struct room *rp, coord *door); | |
1297 void draw_room(struct room *rp); | |
1298 bool drop(struct linked_list *item); | |
1299 bool dropcheck(struct object *op); | |
1300 void dsrpt_monster(struct thing *tp, bool always, bool see_him); | |
1301 void dsrpt_player(void); | |
1302 void dust_appear(void); | |
1303 void eat(void); | |
1304 void eat_gold(struct object *obj); | |
1305 int effect(struct thing *att, struct thing *def, struct object *weap, | |
1306 bool thrown, bool see_att, bool see_def); | |
1307 long encread(char *start, unsigned long size, int inf); | |
1308 long encwrite(char *start, unsigned long size, FILE *outf); | |
1309 void endit(int sig); | |
1310 void endmsg(void); | |
1311 void exit_game(int flag); | |
1312 void explode(struct thing *tp); | |
1313 void extinguish(int (*dfunc)()); | |
1314 void fall(struct linked_list *item, bool pr); | |
1315 coord *fallpos(coord *pos, bool be_clear, int range); | |
1316 void fatal(char *s); | |
1317 bool fight(coord *mp, struct object *weap, bool thrown); | |
1318 struct linked_list *find_mons(int y, int x); | |
1319 struct linked_list *find_obj(int y, int x); | |
1320 struct delayed_action *find_slot(int (*func)()); | |
1321 int findmindex(char *name); | |
1322 void fix_stick(struct object *cur); | |
1323 void fright(struct thing *th); | |
1324 void fumble(void); | |
1325 void fuse(int (*dfunc)(), VOID *arg, int time, int type); | |
1326 void genmonsters(int least, bool treas); | |
1327 coord get_coordinates(void); | |
1328 bool get_dir(coord *direction); | |
1329 struct linked_list *get_hurl(struct thing *tp); | |
1330 struct linked_list *get_item(struct linked_list *list, char *purpose, int type, | |
1331 bool askfirst, bool showcost); | |
1332 int get_str(char *opt, WINDOW *win); | |
1333 long get_worth(struct object *obj); | |
1334 int getdeath(void); | |
1335 bool getdelta(char match, int *dy, int *dx); | |
1336 void give(struct thing *th); | |
1337 int grab(int y, int x); | |
1338 void gsense(void); | |
1339 void help(void); | |
1340 bool hit_monster(int y, int x, struct object *obj, struct thing *tp); | |
1341 int hitweight(void); | |
1342 void idenpack(void); | |
1343 void ident_hero(void); | |
1344 void identify(unsigned char ch); | |
1345 void init_colors(void); | |
1346 void init_foods(void); | |
1347 void init_materials(void); | |
1348 void init_misc(void); | |
1349 void init_names(void); | |
1350 void init_player(void); | |
1351 void init_stones(void); | |
1352 void init_terrain(void); | |
1353 void init_things(void); | |
1354 void init_weapon(struct object *weap, char type); | |
1355 char *inv_name(struct object *obj, bool drop); | |
1356 bool inventory(struct linked_list *list, int type); | |
1357 bool invisible(struct thing *monst); | |
1358 bool is_current(struct object *obj); | |
1359 bool is_magic(struct object *obj); | |
1360 bool isatrap(char ch); | |
1361 int itemweight(struct object *wh); | |
1362 void kill_daemon(int (*dfunc)()); | |
1363 void killed(struct linked_list *item, bool pr, bool points, bool treasure); | |
1364 int land(void); | |
1365 void lengthen(int (*dfunc)(), int xtime); | |
1366 void light(coord *cp); | |
1367 bool lit_room(struct room *rp); | |
1368 void look(bool wakeup, bool runend); | |
1369 void lower_level(short who); | |
1370 void m_use_relic(struct thing *monster); | |
1371 void m_use_wand(struct thing *monster); | |
1372 void make_sell_pack(struct thing *tp); | |
1373 short makemonster(bool showall, char *action); | |
1374 bool maze_view(int y, int x); | |
1375 int misc_name(char *str, struct object *obj); | |
1376 void missile(int ydelta, int xdelta, struct linked_list *item, | |
1377 struct thing *tp); | |
1378 char *monster_name(struct thing *tp); | |
1379 bool move_hero(int why); | |
1380 short movement(struct thing *tp); | |
1381 void msg(char *fmt, ...); | |
1382 void nameitem(struct linked_list *item, bool mark); | |
1383 bool need_dir(int type, int which); | |
1384 char *new(int size); | |
1385 struct linked_list *new_item(int size); | |
1386 void new_level(LEVTYPE ltype); | |
1387 void new_monster(struct linked_list *item, short type, coord *cp, | |
1388 bool max_monster); | |
1389 struct linked_list *new_thing(int thing_type, bool allow_curse); | |
1390 void nobolt(void); | |
1391 void nocold(void); | |
1392 void nofire(void); | |
1393 void nohaste(void); | |
1394 void noslow(void); | |
1395 char *num(int n1, int n2); | |
1396 void o_discard(struct linked_list *item); | |
1397 void opt_player(void); | |
1398 void option(void); | |
1399 void over_win(WINDOW *oldwin, WINDOW *newin, int maxy, int maxx, int cursory, | |
1400 int cursorx, char redraw); | |
1401 char pack_char(struct linked_list *list, struct object *obj); | |
1402 void parse_opts(char *str); | |
1403 bool passwd(void); | |
1404 void picky_inven(void); | |
1405 bool player_zap(int which, int flag); | |
1406 void playit(void); | |
1407 void pray(void); | |
1408 void prayer_recovery(void); | |
1409 bool price_it(void); | |
1410 char *prname(char *who, bool upper); | |
1411 void quaff(int which, int kind, int flags, bool is_potion); | |
1412 void quill_charge(void); | |
1413 void quit(int sig); | |
1414 void raise_level(void); | |
1415 short randmonster(bool wander, bool no_unique); | |
1416 void read_scroll(int which, int flag, bool is_scroll); | |
1417 void reap(void); | |
1418 int res_strength(long howmuch); | |
1419 bool restore(char *file, char *envp[]); | |
1420 void restscr(WINDOW *scr); | |
1421 int ring_eat(int hand); | |
1422 char *ring_num(struct object *obj); | |
1423 void ring_on(struct linked_list *item); | |
1424 void ring_search(void); | |
1425 void ring_teleport(void); | |
1426 int ring_value(int type); | |
1427 void rmmsg(void); | |
1428 int rnd(int range); | |
1429 void rnd_pos(struct room *rp, coord *cp); | |
1430 int rnd_room(void); | |
1431 coord rndmove(struct thing *who); | |
1432 int roll(int number, int sides); | |
1433 void rollwand(void); | |
1434 struct room *roomin(coord *cp); | |
1435 int runners(int segments); | |
1436 void runto(struct thing *runner, coord *spot); | |
1437 bool save(int which, struct thing *who, int adj); | |
1438 bool save_game(void); | |
1439 char secretdoor(int y, int x); | |
1440 void score(unsigned long amount, int flags, short monst); | |
1441 void search(bool is_thief, bool door_chime); | |
1442 void sell(struct thing *tp); | |
1443 void sell_it(void); | |
1444 void set_trap(struct thing *tp, int y, int x); | |
1445 void setup(void); | |
1446 void shoot_bolt(struct thing *shooter, coord start, coord dir, | |
1447 bool get_points, short reason, char *name, int damage); | |
1448 bool shoot_ok(int ch); | |
1449 char show(int y, int x); | |
1450 void sight(void); | |
1451 bool skirmish(struct thing *attacker, coord *mp, struct object *weap, | |
1452 bool thrown); | |
1453 struct linked_list *spec_item(int type, int which, int hit, int damage); | |
1454 void spell_recovery(void); | |
1455 void start_daemon(int (*dfunc)(), VOID *arg, int type); | |
1456 void status(bool display); | |
1457 void steal(void); | |
1458 bool step_ok(int y, int x, int can_on_monst, struct thing *flgptr); | |
1459 void stomach(void); | |
1460 int str_compute(void); | |
1461 int str_plus(short str); | |
1462 void strangle(void); | |
1463 void strucpy(char *s1, char *s2, int len); | |
1464 void suffocate(void); | |
1465 void swander(void); | |
1466 bool swing(short class, int at_lvl, int op_arm, int wplus); | |
1467 void take_off(void); | |
1468 void take_with(void); | |
1469 void teleport(void); | |
1470 void total_winner(void); | |
1471 int totalenc(struct thing *tp); | |
1472 char *tr_name(char ch); | |
1473 struct trap *trap_at(int y, int x); | |
1474 void trap_look(void); | |
1475 void unchoke(void); | |
1476 void unclrhead(void); | |
1477 void unconfuse(void); | |
1478 int undance(void); | |
1479 void unphase(void); | |
1480 void unsee(void); | |
1481 void unskill(void); | |
1482 void unstink(void); | |
1483 void updpack(int getmax, struct thing *tp); | |
1484 int usage_time(struct linked_list *item); | |
1485 void use_mm(int which); | |
1486 char *vowelstr(char *str); | |
1487 void wait_for(char ch); | |
1488 struct linked_list *wake_monster(int y, int x); | |
1489 void wake_room(struct room *rp); | |
1490 void wanderer(void); | |
1491 void waste_time(void); | |
1492 int weap_move(struct thing *wielder, struct object *weap); | |
1493 char *weap_name(struct object *obj); | |
1494 void wear(void); | |
1495 void wghtchk(void); | |
1496 void whatis(struct linked_list *what); | |
1497 void wield(void); | |
1498 struct linked_list *wield_weap(struct object *thrown, struct thing *mp); | |
1499 void writelog(unsigned long amount, int flags, short monst); | |
1500 void xsense(void); | |
1501 | |
1502 char *getenv(), *misc_num(); | |
1503 | |
1504 int usage_time(); | |
1505 | |
1506 void tstp(); | |
1507 | |
1508 int md_getuid(void); | |
1509 long md_memused(void); | |
1510 int md_normaluser(void); | |
1511 int md_rand(int range); | |
1512 void md_setup(void); | |
1513 int md_shellescape(void); | |
1514 int md_srand(int seed); | |
1273 | 1515 |
1274 /* | 1516 /* |
1275 * Now all the global variables | 1517 * Now all the global variables |
1276 */ | 1518 */ |
1277 | 1519 |
1403 extern char *morestr; | 1645 extern char *morestr; |
1404 extern char *retstr; | 1646 extern char *retstr; |
1405 extern FILE *scorefi; | 1647 extern FILE *scorefi; |
1406 extern FILE *logfile; | 1648 extern FILE *logfile; |
1407 extern LEVTYPE levtype; | 1649 extern LEVTYPE levtype; |
1408 extern int (*add_abil[NUMABILITIES])(); /* Functions to change abilities */ | 1650 extern int (*add_abil[NUMABILITIES])(int); /* Functions to change abilities */ |
1409 extern int (*res_abil[NUMABILITIES])(); /* Functions to change abilities */ | 1651 extern int (*res_abil[NUMABILITIES])(); /* Functions to change abilities */ |
1410 extern int mf_count; /* move_free counter - see actions.c(m_act()) */ | 1652 extern int mf_count; /* move_free counter - see actions.c(m_act()) */ |
1411 extern int mf_jmpcnt; /* move_free counter for # of jumps */ | 1653 extern int mf_jmpcnt; /* move_free counter for # of jumps */ |
1412 extern int killed_chance; /* cumulative chance for goodies to loose it, fight.c */ | 1654 extern int killed_chance; /* cumulative chance for goodies to loose it, fight.c */ |
1413 extern coord move_nh; /* move.c */ | 1655 extern coord move_nh; /* move.c */ |