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 <ctype.h>
|
||||
#include "rogue.h"
|
||||
#include "rogue.ext"
|
||||
|
|
@ -22,8 +23,8 @@
|
|||
* missile:
|
||||
* Fire a missile in a given direction
|
||||
*/
|
||||
missile(ydelta, xdelta)
|
||||
int ydelta, xdelta;
|
||||
void
|
||||
missile(int ydelta, int xdelta)
|
||||
{
|
||||
reg struct object *obj, *nowwield;
|
||||
reg struct linked_list *item, *nitem;
|
||||
|
|
@ -83,9 +84,8 @@ int ydelta, xdelta;
|
|||
* do the actual motion on the screen done by an object traveling
|
||||
* across the room
|
||||
*/
|
||||
do_motion(obj, ydelta, xdelta)
|
||||
struct object *obj;
|
||||
int ydelta, xdelta;
|
||||
void
|
||||
do_motion(struct object *obj, int ydelta, int xdelta)
|
||||
{
|
||||
reg int ch, y, x;
|
||||
|
||||
|
|
@ -120,9 +120,8 @@ int ydelta, xdelta;
|
|||
* Drop an item someplace around here.
|
||||
*/
|
||||
|
||||
fall(item, pr)
|
||||
struct linked_list *item;
|
||||
bool pr;
|
||||
void
|
||||
fall(struct linked_list *item, bool pr)
|
||||
{
|
||||
reg struct object *obj;
|
||||
reg struct room *rp;
|
||||
|
|
@ -155,9 +154,8 @@ bool pr;
|
|||
* Set up the initial goodies for a weapon
|
||||
*/
|
||||
|
||||
init_weapon(weap, type)
|
||||
struct object *weap;
|
||||
int type;
|
||||
void
|
||||
init_weapon(struct object *weap, int type)
|
||||
{
|
||||
reg struct init_weps *iwp;
|
||||
|
||||
|
|
@ -182,9 +180,8 @@ int type;
|
|||
* hit_monster:
|
||||
* Does the missile hit the monster
|
||||
*/
|
||||
hit_monster(mp, obj)
|
||||
struct coord *mp;
|
||||
struct object *obj;
|
||||
bool
|
||||
hit_monster(struct coord *mp, struct object *obj)
|
||||
{
|
||||
return fight(mp, obj, TRUE);
|
||||
}
|
||||
|
|
@ -194,8 +191,7 @@ struct object *obj;
|
|||
* Figure out the plus number for armor/weapons
|
||||
*/
|
||||
char *
|
||||
num(n1, n2)
|
||||
int n1, n2;
|
||||
num(int n1, int n2)
|
||||
{
|
||||
static char numbuf[LINLEN];
|
||||
|
||||
|
|
@ -212,7 +208,8 @@ int n1, n2;
|
|||
* wield:
|
||||
* Pull out a certain weapon
|
||||
*/
|
||||
wield()
|
||||
void
|
||||
wield(void)
|
||||
{
|
||||
reg struct linked_list *item;
|
||||
reg struct object *obj, *oweapon;
|
||||
|
|
@ -238,9 +235,8 @@ wield()
|
|||
* fallpos:
|
||||
* Pick a random position around the give (y, x) coordinates
|
||||
*/
|
||||
fallpos(pos, newpos, passages)
|
||||
struct coord *pos, *newpos;
|
||||
bool passages;
|
||||
bool
|
||||
fallpos(struct coord *pos, struct coord *newpos, bool passages)
|
||||
{
|
||||
reg int y, x, ch;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue