XRogue: convert to ANSI-style function declarations.
This commit is contained in:
parent
e8e6e604c3
commit
2853120387
41 changed files with 1281 additions and 908 deletions
|
|
@ -21,13 +21,17 @@
|
|||
#include <string.h>
|
||||
#include "rogue.h"
|
||||
|
||||
int pick_one(struct magic_item *magic, int nitems);
|
||||
char *blesscurse(int flags);
|
||||
char *p_kind(struct object *obj);
|
||||
int extras(void);
|
||||
|
||||
/*
|
||||
* print out the number of charges on a stick
|
||||
*/
|
||||
|
||||
char *
|
||||
charge_str(obj)
|
||||
register struct object *obj;
|
||||
charge_str(struct object *obj)
|
||||
{
|
||||
static char buf[20];
|
||||
|
||||
|
|
@ -47,9 +51,7 @@ register struct object *obj;
|
|||
*/
|
||||
|
||||
char *
|
||||
inv_name(obj, drop)
|
||||
register struct object *obj;
|
||||
bool drop;
|
||||
inv_name(struct object *obj, bool drop)
|
||||
{
|
||||
register char *pb;
|
||||
|
||||
|
|
@ -331,8 +333,7 @@ bool drop;
|
|||
*/
|
||||
|
||||
char *
|
||||
weap_name(obj)
|
||||
register struct object *obj;
|
||||
weap_name(struct object *obj)
|
||||
{
|
||||
switch (obj->o_type) {
|
||||
case WEAPON:
|
||||
|
|
@ -365,8 +366,8 @@ register struct object *obj;
|
|||
* put something down
|
||||
*/
|
||||
|
||||
drop(item)
|
||||
struct linked_list *item;
|
||||
bool
|
||||
drop(struct linked_list *item)
|
||||
{
|
||||
register char ch = 0;
|
||||
register struct linked_list *obj, *nobj;
|
||||
|
|
@ -473,8 +474,8 @@ struct linked_list *item;
|
|||
* do special checks for dropping or unweilding|unwearing|unringing
|
||||
*/
|
||||
|
||||
dropcheck(op)
|
||||
register struct object *op;
|
||||
bool
|
||||
dropcheck(struct object *op)
|
||||
{
|
||||
int save_max;
|
||||
|
||||
|
|
@ -583,9 +584,7 @@ register struct object *op;
|
|||
*/
|
||||
|
||||
struct linked_list *
|
||||
new_thing(thing_type, allow_curse)
|
||||
int thing_type;
|
||||
bool allow_curse;
|
||||
new_thing(int thing_type, bool allow_curse)
|
||||
{
|
||||
register struct linked_list *item;
|
||||
register struct object *cur;
|
||||
|
|
@ -801,8 +800,7 @@ bool allow_curse;
|
|||
*/
|
||||
|
||||
struct linked_list *
|
||||
spec_item(type, which, hit, damage)
|
||||
int type, which, hit, damage;
|
||||
spec_item(int type, int which, int hit, int damage)
|
||||
{
|
||||
register struct linked_list *item;
|
||||
register struct object *obj;
|
||||
|
|
@ -877,9 +875,8 @@ int type, which, hit, damage;
|
|||
* pick an item out of a list of nitems possible magic items
|
||||
*/
|
||||
|
||||
pick_one(magic, nitems)
|
||||
register struct magic_item *magic;
|
||||
int nitems;
|
||||
int
|
||||
pick_one(struct magic_item *magic, int nitems)
|
||||
{
|
||||
register struct magic_item *end;
|
||||
register int i;
|
||||
|
|
@ -908,8 +905,7 @@ int nitems;
|
|||
*/
|
||||
|
||||
char *
|
||||
blesscurse(flags)
|
||||
int flags;
|
||||
blesscurse(int flags)
|
||||
{
|
||||
if (flags & ISKNOW) {
|
||||
if (flags & ISCURSED) return("cursed ");
|
||||
|
|
@ -922,11 +918,11 @@ int flags;
|
|||
/*
|
||||
* p_kind returns the type of potion for some types of identified potions;
|
||||
* otherwise, it returns the color.
|
||||
* We assume that obj points to a potion.
|
||||
*/
|
||||
|
||||
char *
|
||||
p_kind(obj)
|
||||
struct object *obj; /* We assume that obj points to a potion */
|
||||
p_kind(struct object *obj)
|
||||
{
|
||||
if (obj->o_which == P_ABIL) return(abilities[obj->o_kind].w_string);
|
||||
else return(p_colors[obj->o_which]);
|
||||
|
|
@ -937,7 +933,8 @@ struct object *obj; /* We assume that obj points to a potion */
|
|||
* Return the number of extra items to be created
|
||||
*/
|
||||
|
||||
extras()
|
||||
int
|
||||
extras(void)
|
||||
{
|
||||
reg int i;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue