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
|
|
@ -22,16 +22,14 @@
|
|||
#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;
|
||||
|
|
@ -499,7 +497,7 @@ int flags;
|
|||
if (pstats.s_hpt <= 0) {
|
||||
msg("Your life has been sucked from you -- More --");
|
||||
wait_for(' ');
|
||||
death(zapper);
|
||||
death(zapper->t_index);
|
||||
}
|
||||
else
|
||||
msg("You feel a great drain on your system");
|
||||
|
|
@ -625,8 +623,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;
|
||||
|
|
@ -698,8 +696,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;
|
||||
|
|
@ -738,8 +736,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;
|
||||
|
||||
|
|
@ -764,14 +762,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) {
|
||||
|
|
@ -799,9 +799,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;
|
||||
|
|
@ -868,13 +867,9 @@ int flag;
|
|||
* given direction
|
||||
*/
|
||||
|
||||
shoot_bolt(shooter, start, dir, get_points, reason, name, damage)
|
||||
struct thing *shooter;
|
||||
coord start, dir;
|
||||
bool get_points;
|
||||
short reason;
|
||||
char *name;
|
||||
int damage;
|
||||
void
|
||||
shoot_bolt(struct thing *shooter, coord start, coord dir, bool get_points,
|
||||
short reason, char *name, int damage)
|
||||
{
|
||||
register char dirch, ch;
|
||||
register bool used, change;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue