XRogue: convert to ANSI-style function declarations.

This commit is contained in:
John "Elwin" Edwards 2016-03-02 21:13:26 -05:00
parent e8e6e604c3
commit 2853120387
41 changed files with 1281 additions and 908 deletions

View file

@ -19,14 +19,15 @@
#include <curses.h>
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
#include "rogue.h"
/*
* Check_residue takes care of any effect of the monster
*/
check_residue(tp)
register struct thing *tp;
void
check_residue(struct thing *tp)
{
/*
* Take care of special abilities
@ -70,13 +71,11 @@ register struct thing *tp;
/*
* Creat_mons creates the specified monster -- any if 0
* person: where to create next to
*/
bool
creat_mons(person, monster, report)
struct thing *person; /* Where to create next to */
short monster;
bool report;
creat_mons(struct thing *person, short monster, bool report)
{
struct linked_list *nitem;
register struct thing *tp;
@ -131,9 +130,7 @@ bool report;
*/
void
genmonsters(least, treas)
register int least;
bool treas;
genmonsters(int least, bool treas)
{
reg int i;
reg struct room *rp = &rooms[0];
@ -180,8 +177,7 @@ bool treas;
*/
short
id_monst(monster)
register char monster;
id_monst(char monster)
{
register short result;
@ -215,11 +211,8 @@ register char monster;
* Pick a new monster and add it to the list
*/
new_monster(item, type, cp, max_monster)
struct linked_list *item;
short type;
coord *cp;
bool max_monster;
void
new_monster(struct linked_list *item, short type, coord *cp, bool max_monster)
{
register struct thing *tp;
register struct monster *mp;
@ -428,8 +421,7 @@ bool max_monster;
*/
short
randmonster(wander, no_unique)
register bool wander, no_unique;
randmonster(bool wander, bool no_unique)
{
register int d, cur_level, range, i;
@ -491,8 +483,8 @@ register bool wander, no_unique;
* to purchase something.
*/
sell(tp)
register struct thing *tp;
void
sell(struct thing *tp)
{
register struct linked_list *item, *seller;
register struct linked_list *sellpack;
@ -588,8 +580,7 @@ register struct thing *tp;
*/
struct linked_list *
wake_monster(y, x)
int y, x;
wake_monster(int y, int x)
{
register struct thing *tp;
register struct linked_list *it;
@ -786,7 +777,8 @@ int y, x;
* A wandering monster has awakened and is headed for the player
*/
wanderer()
void
wanderer(void)
{
register int i;
register struct room *hr = roomin(&hero);