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
|
|
@ -12,6 +12,7 @@
|
|||
* See the file LICENSE.TXT for full copyright and licensing information.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <limits.h>
|
||||
#include "curses.h"
|
||||
|
|
@ -21,8 +22,8 @@
|
|||
|
||||
coord ch_ret; /* Where chasing takes you */
|
||||
|
||||
|
||||
|
||||
struct linked_list *get_hurl(struct thing *tp);
|
||||
bool straight_shot(int ery, int erx, int eey, int eex, coord *shooting);
|
||||
|
||||
|
||||
/*
|
||||
|
|
@ -31,8 +32,7 @@ coord ch_ret; /* Where chasing takes you */
|
|||
*/
|
||||
|
||||
bool
|
||||
can_blink(tp)
|
||||
register struct thing *tp;
|
||||
can_blink(struct thing *tp)
|
||||
{
|
||||
register int y, x, index=9;
|
||||
coord tryp; /* To hold the coordinates for use in diag_ok */
|
||||
|
|
@ -128,8 +128,7 @@ register struct thing *tp;
|
|||
*/
|
||||
|
||||
coord *
|
||||
can_shoot(er, ee)
|
||||
register coord *er, *ee;
|
||||
can_shoot(coord *er, coord *ee)
|
||||
{
|
||||
static coord shoot_dir;
|
||||
|
||||
|
|
@ -154,13 +153,11 @@ register coord *er, *ee;
|
|||
* FALSE if we reach the goal.
|
||||
*/
|
||||
|
||||
chase(tp, ee, flee, mdead)
|
||||
register struct thing *tp;
|
||||
register coord *ee;
|
||||
bool flee; /* True if destination (ee) is player and monster is running away
|
||||
* or the player is in a wall and the monster can't get to it
|
||||
*/
|
||||
bool *mdead;
|
||||
/* flee: True if destination (ee) is player and monster is running
|
||||
* away or the player is in a wall and the monster can't get to it
|
||||
*/
|
||||
bool
|
||||
chase(struct thing *tp, coord *ee, bool flee, bool *mdead)
|
||||
{
|
||||
int damage, dist, thisdist, monst_dist = MAXINT;
|
||||
struct linked_list *weapon;
|
||||
|
|
@ -530,10 +527,10 @@ bool *mdead;
|
|||
* do_chase:
|
||||
* Make one thing chase another.
|
||||
*/
|
||||
/* flee: True if running away or player is inaccessible in wall */
|
||||
|
||||
do_chase(th, flee)
|
||||
register struct thing *th;
|
||||
register bool flee; /* True if running away or player is inaccessible in wall */
|
||||
void
|
||||
do_chase(struct thing *th, bool flee)
|
||||
{
|
||||
register struct room *rer, *ree, /* room of chaser, room of chasee */
|
||||
*orig_rer, /* Original room of chaser */
|
||||
|
|
@ -830,8 +827,7 @@ register bool flee; /* True if running away or player is inaccessible in wall */
|
|||
*/
|
||||
|
||||
struct linked_list *
|
||||
get_hurl(tp)
|
||||
register struct thing *tp;
|
||||
get_hurl(struct thing *tp)
|
||||
{
|
||||
struct linked_list *arrow, *bolt, *rock;
|
||||
register struct linked_list *pitem;
|
||||
|
|
@ -861,7 +857,8 @@ register struct thing *tp;
|
|||
* Make all the running monsters move.
|
||||
*/
|
||||
|
||||
runners()
|
||||
void
|
||||
runners(void)
|
||||
{
|
||||
register struct linked_list *item;
|
||||
register struct thing *tp = NULL;
|
||||
|
|
@ -935,9 +932,8 @@ runners()
|
|||
* Set a monster running after something
|
||||
*/
|
||||
|
||||
runto(runner, spot)
|
||||
register struct thing *runner;
|
||||
coord *spot;
|
||||
void
|
||||
runto(struct thing *runner, coord *spot)
|
||||
{
|
||||
/*
|
||||
* Start the beastie running
|
||||
|
|
@ -959,9 +955,7 @@ coord *spot;
|
|||
*/
|
||||
|
||||
bool
|
||||
straight_shot(ery, erx, eey, eex, shooting)
|
||||
register int ery, erx, eey, eex;
|
||||
register coord *shooting;
|
||||
straight_shot(int ery, int erx, int eey, int eex, coord *shooting)
|
||||
{
|
||||
register int dy, dx; /* Deltas */
|
||||
char ch;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue