Advanced Rogue 7: convert to ANSI-style function declarations.
Almost 1500 lines of compiler warnings remain, and the GCC developers are already working on a new version with even more warnings turned on by default.
This commit is contained in:
parent
f38b2223c8
commit
e8e6e604c3
39 changed files with 1181 additions and 889 deletions
|
|
@ -21,13 +21,14 @@
|
|||
#include "rogue.h"
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.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
|
||||
|
|
@ -71,13 +72,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;
|
||||
|
|
@ -132,9 +131,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;
|
||||
|
||||
|
|
@ -201,11 +197,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;
|
||||
|
|
@ -415,8 +408,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;
|
||||
|
||||
|
|
@ -455,8 +447,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;
|
||||
|
|
@ -551,8 +543,7 @@ register struct thing *tp;
|
|||
* what to do when the hero steps next to a monster
|
||||
*/
|
||||
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;
|
||||
|
|
@ -749,7 +740,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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue