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

@ -21,16 +21,15 @@
#include <string.h>
#include "rogue.h"
void drain(int ymin, int ymax, int xmin, int xmax);
/*
* zap a stick and see what happens
*/
do_zap(zapper, obj, direction, which, flags)
struct thing *zapper;
struct object *obj;
coord *direction;
int which;
int flags;
void
do_zap(struct thing *zapper, struct object *obj, coord *direction, int which,
int flags)
{
register struct linked_list *item = NULL;
register struct thing *tp;
@ -647,8 +646,8 @@ int flags;
* Do drain hit points from player shtick
*/
drain(ymin, ymax, xmin, xmax)
int ymin, ymax, xmin, xmax;
void
drain(int ymin, int ymax, int xmin, int xmax)
{
register int i, j, count;
register struct thing *ick;
@ -727,8 +726,8 @@ int ymin, ymax, xmin, xmax;
* initialize a stick
*/
fix_stick(cur)
register struct object *cur;
void
fix_stick(struct object *cur)
{
if (EQUAL(ws_type[cur->o_which], "staff")) {
cur->o_weight = 100;
@ -768,8 +767,8 @@ register struct object *cur;
* Use the wand that our monster is wielding.
*/
m_use_wand(monster)
register struct thing *monster;
void
m_use_wand(struct thing *monster)
{
register struct object *obj;
@ -794,14 +793,16 @@ register struct thing *monster;
*/
msg("%s points a %s at you!", prname(monster_name(monster), TRUE),
ws_type[obj->o_which]);
do_zap(monster, obj, &monster->t_newpos, obj->o_which, NULL);
do_zap(monster, obj, &monster->t_newpos, obj->o_which, 0);
monster->t_wand /= 2; /* chance lowers with each use */
}
/*
* type: type of item, NULL means stick
* which: which item
*/
bool
need_dir(type, which)
int type, /* type of item, NULL means stick */
which; /* which item */
need_dir(int type, int which)
{
if (type == STICK || type == 0) {
switch (which) {
@ -831,9 +832,8 @@ return (FALSE); /* hope we don't get here */
* let the player zap a stick and see what happens
*/
player_zap(which, flag)
int which;
int flag;
bool
player_zap(int which, int flag)
{
register struct linked_list *item;
register struct object *obj;
@ -869,7 +869,7 @@ int flag;
switch (obj->o_which) {
case ORCUS_WAND:
/* msg(nothing); */
read_scroll(S_PETRIFY, NULL, FALSE);
read_scroll(S_PETRIFY, 0, FALSE);
return(TRUE);
when MING_STAFF:
which = WS_MISSILE;