Super-Rogue: convert to ANSI-style function declarations.
This fixes most of the build warnings.
This commit is contained in:
parent
0f87d5b4d8
commit
59f448e92e
33 changed files with 783 additions and 518 deletions
|
|
@ -14,6 +14,7 @@
|
|||
* See the file LICENSE.TXT for full copyright and licensing information.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include "rogue.h"
|
||||
#include <ctype.h>
|
||||
#include "rogue.ext"
|
||||
|
|
@ -23,10 +24,10 @@
|
|||
* Pick a monster to show up. The lower the level,
|
||||
* the meaner the monster.
|
||||
*/
|
||||
rnd_mon(wander,baddie)
|
||||
bool wander;
|
||||
bool baddie; /* TRUE when from a polymorph stick */
|
||||
char
|
||||
rnd_mon(bool wander, bool baddie)
|
||||
{
|
||||
/* baddie; TRUE when from a polymorph stick */
|
||||
reg int i, ok, cnt;
|
||||
|
||||
cnt = 0;
|
||||
|
|
@ -60,7 +61,8 @@ bool baddie; /* TRUE when from a polymorph stick */
|
|||
* lev_mon:
|
||||
* This gets all monsters possible on this level
|
||||
*/
|
||||
lev_mon()
|
||||
void
|
||||
lev_mon(void)
|
||||
{
|
||||
reg int i;
|
||||
reg struct monster *mm;
|
||||
|
|
@ -83,10 +85,7 @@ lev_mon()
|
|||
* Pick a new monster and add it to the list
|
||||
*/
|
||||
struct linked_list *
|
||||
new_monster(type, cp, treas)
|
||||
struct coord *cp;
|
||||
bool treas;
|
||||
char type;
|
||||
new_monster(char type, struct coord *cp, bool treas)
|
||||
{
|
||||
reg struct linked_list *item;
|
||||
reg struct thing *tp;
|
||||
|
|
@ -191,7 +190,8 @@ char type;
|
|||
* wanderer:
|
||||
* A wandering monster has awakened and is headed for the player
|
||||
*/
|
||||
wanderer()
|
||||
void
|
||||
wanderer(void)
|
||||
{
|
||||
reg int ch = '-';
|
||||
reg struct room *rp, *hr = player.t_room;
|
||||
|
|
@ -217,8 +217,7 @@ wanderer()
|
|||
* 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)
|
||||
{
|
||||
reg struct thing *tp;
|
||||
reg struct linked_list *it;
|
||||
|
|
@ -279,7 +278,8 @@ int y, x;
|
|||
* genocide:
|
||||
* Eradicate a monster forevermore
|
||||
*/
|
||||
genocide()
|
||||
void
|
||||
genocide(void)
|
||||
{
|
||||
reg struct linked_list *ip, *nip;
|
||||
reg struct thing *mp;
|
||||
|
|
@ -331,8 +331,8 @@ tryagain:
|
|||
* unhold:
|
||||
* Release the player from being held
|
||||
*/
|
||||
unhold(whichmon)
|
||||
char whichmon;
|
||||
void
|
||||
unhold(char whichmon)
|
||||
{
|
||||
switch (whichmon) {
|
||||
case 'F':
|
||||
|
|
@ -347,8 +347,8 @@ char whichmon;
|
|||
* midx:
|
||||
* This returns an index to 'whichmon'
|
||||
*/
|
||||
midx(whichmon)
|
||||
char whichmon;
|
||||
int
|
||||
midx(char whichmon)
|
||||
{
|
||||
if (isupper(whichmon))
|
||||
return(whichmon - 'A'); /* 0 to 25 for uppercase */
|
||||
|
|
@ -363,8 +363,8 @@ char whichmon;
|
|||
* See when monster should run or fight. Return
|
||||
* TRUE if hit points less than acceptable.
|
||||
*/
|
||||
monhurt(th)
|
||||
struct thing *th;
|
||||
bool
|
||||
monhurt(struct thing *th)
|
||||
{
|
||||
reg int ewis, crithp, f1, f2;
|
||||
reg struct stats *st;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue