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
|
|
@ -19,11 +19,15 @@
|
|||
#include "rogue.h"
|
||||
#include "rogue.ext"
|
||||
|
||||
int gethand(bool isrmv);
|
||||
int ring_eat(void);
|
||||
|
||||
/*
|
||||
* ring_on:
|
||||
* Put on a ring
|
||||
*/
|
||||
ring_on()
|
||||
void
|
||||
ring_on(void)
|
||||
{
|
||||
reg struct object *obj;
|
||||
reg struct linked_list *item;
|
||||
|
|
@ -144,7 +148,8 @@ ring_on()
|
|||
* ring_off:
|
||||
* Take off some ring
|
||||
*/
|
||||
ring_off()
|
||||
void
|
||||
ring_off(void)
|
||||
{
|
||||
reg int ring;
|
||||
reg struct object *obj;
|
||||
|
|
@ -178,8 +183,8 @@ ring_off()
|
|||
* toss_ring:
|
||||
* Remove a ring and stop its effects
|
||||
*/
|
||||
toss_ring(what)
|
||||
struct object *what;
|
||||
void
|
||||
toss_ring(struct object *what)
|
||||
{
|
||||
bool okring;
|
||||
|
||||
|
|
@ -228,8 +233,8 @@ struct object *what;
|
|||
* gethand:
|
||||
* Get a hand to wear a ring
|
||||
*/
|
||||
gethand(isrmv)
|
||||
bool isrmv;
|
||||
int
|
||||
gethand(bool isrmv)
|
||||
{
|
||||
reg int c;
|
||||
char *ptr;
|
||||
|
|
@ -280,7 +285,8 @@ bool isrmv;
|
|||
* ring_eat:
|
||||
* How much food do the hero's rings use up?
|
||||
*/
|
||||
ring_eat()
|
||||
int
|
||||
ring_eat(void)
|
||||
{
|
||||
reg struct object *lb;
|
||||
reg int hand, i, howmuch;
|
||||
|
|
@ -335,8 +341,7 @@ ring_eat()
|
|||
* Print ring bonuses
|
||||
*/
|
||||
char *
|
||||
ring_num(what)
|
||||
struct object *what;
|
||||
ring_num(struct object *what)
|
||||
{
|
||||
static char number[5];
|
||||
|
||||
|
|
@ -355,8 +360,8 @@ struct object *what;
|
|||
* magring:
|
||||
* Returns TRUE if a ring has a number, i.e. +2
|
||||
*/
|
||||
magring(what)
|
||||
struct object *what;
|
||||
bool
|
||||
magring(struct object *what)
|
||||
{
|
||||
switch(what->o_which) {
|
||||
case R_SPEED:
|
||||
|
|
@ -379,7 +384,8 @@ struct object *what;
|
|||
* ringabil:
|
||||
* Compute effective abilities due to rings
|
||||
*/
|
||||
ringabil()
|
||||
void
|
||||
ringabil(void)
|
||||
{
|
||||
reg struct object *rptr;
|
||||
reg int i;
|
||||
|
|
@ -406,10 +412,10 @@ ringabil()
|
|||
* init_ring:
|
||||
* Initialize a ring
|
||||
*/
|
||||
init_ring(what,fromwiz)
|
||||
struct object *what;
|
||||
bool fromwiz; /* TRUE when from wizards */
|
||||
void
|
||||
init_ring(struct object *what, bool fromwiz)
|
||||
{
|
||||
/* fromwiz: TRUE when from wizards */
|
||||
reg int much;
|
||||
|
||||
switch (what->o_which) {
|
||||
|
|
@ -459,8 +465,8 @@ bool fromwiz; /* TRUE when from wizards */
|
|||
* ringex:
|
||||
* Get extra gains from rings
|
||||
*/
|
||||
ringex(rtype)
|
||||
int rtype;
|
||||
int
|
||||
ringex(int rtype)
|
||||
{
|
||||
reg int howmuch = 0;
|
||||
|
||||
|
|
@ -475,8 +481,8 @@ int rtype;
|
|||
* iswearing:
|
||||
* Returns TRUE when the hero is wearing a certain type of ring
|
||||
*/
|
||||
iswearing(ring)
|
||||
int ring;
|
||||
bool
|
||||
iswearing(int ring)
|
||||
{
|
||||
return (isring(LEFT,ring) || isring(RIGHT,ring));
|
||||
}
|
||||
|
|
@ -485,8 +491,8 @@ int ring;
|
|||
* isring:
|
||||
* Returns TRUE if a ring is on a hand
|
||||
*/
|
||||
isring(hand,ring)
|
||||
int hand, ring;
|
||||
bool
|
||||
isring(int hand, int ring)
|
||||
{
|
||||
if (cur_ring[hand] != NULL && cur_ring[hand]->o_which == ring)
|
||||
return TRUE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue