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,6 +19,9 @@
|
|||
#include "rogue.h"
|
||||
#include "rogue.ext"
|
||||
|
||||
int pinit(void);
|
||||
void badcheck(char *name, struct magic_item *magic);
|
||||
|
||||
char *rainbow[NCOLORS] = {
|
||||
"Red", "Blue", "Green", "Yellow",
|
||||
"Black", "Brown", "Orange", "Pink",
|
||||
|
|
@ -81,25 +84,12 @@ char *metal[NMETAL] = {
|
|||
"Tin", "Titanium", "Zinc",
|
||||
};
|
||||
|
||||
/*
|
||||
* init_everything:
|
||||
* Set up all important stuff.
|
||||
*/
|
||||
init_everything()
|
||||
{
|
||||
init_player(); /* Roll up the rogue */
|
||||
init_things(); /* Set up probabilities */
|
||||
init_names(); /* Set up names of scrolls */
|
||||
init_colors(); /* Set up colors of potions */
|
||||
init_stones(); /* Set up stones in rings */
|
||||
init_materials(); /* Set up materials of wands */
|
||||
}
|
||||
|
||||
/*
|
||||
* init_things:
|
||||
* Initialize the probabilities for types of things
|
||||
*/
|
||||
init_things()
|
||||
void
|
||||
init_things(void)
|
||||
{
|
||||
struct magic_item *mi;
|
||||
|
||||
|
|
@ -128,7 +118,8 @@ init_things()
|
|||
* init_colors:
|
||||
* Initialize the potion color scheme for this time
|
||||
*/
|
||||
init_colors()
|
||||
void
|
||||
init_colors(void)
|
||||
{
|
||||
reg int i, j;
|
||||
reg char *str;
|
||||
|
|
@ -155,7 +146,8 @@ init_colors()
|
|||
* init_names:
|
||||
* Generate the names of the various scrolls
|
||||
*/
|
||||
init_names()
|
||||
void
|
||||
init_names(void)
|
||||
{
|
||||
reg int nsyl;
|
||||
reg char *cp, *sp;
|
||||
|
|
@ -189,7 +181,8 @@ init_names()
|
|||
* Initialize the ring stone setting scheme for this time
|
||||
*/
|
||||
|
||||
init_stones()
|
||||
void
|
||||
init_stones(void)
|
||||
{
|
||||
reg int i, j;
|
||||
reg char *str;
|
||||
|
|
@ -217,7 +210,8 @@ init_stones()
|
|||
* Initialize the construction materials for wands and staffs
|
||||
*/
|
||||
|
||||
init_materials()
|
||||
void
|
||||
init_materials(void)
|
||||
{
|
||||
int i, j;
|
||||
char *str;
|
||||
|
|
@ -264,9 +258,8 @@ init_materials()
|
|||
badcheck("sticks", ws_magic);
|
||||
}
|
||||
|
||||
badcheck(name, magic)
|
||||
char *name;
|
||||
struct magic_item *magic;
|
||||
void
|
||||
badcheck(char *name, struct magic_item *magic)
|
||||
{
|
||||
struct magic_item *mg;
|
||||
|
||||
|
|
@ -289,7 +282,8 @@ struct magic_item *magic;
|
|||
* roll up the rogue
|
||||
*/
|
||||
|
||||
init_player()
|
||||
void
|
||||
init_player(void)
|
||||
{
|
||||
player.t_nomove = 0;
|
||||
player.t_nocmd = 0;
|
||||
|
|
@ -315,7 +309,8 @@ init_player()
|
|||
* pinit:
|
||||
* Returns the best 3 of 4 on a 6-sided die
|
||||
*/
|
||||
pinit()
|
||||
int
|
||||
pinit(void)
|
||||
{
|
||||
int best[4];
|
||||
reg int i, min, minind, dicetot;
|
||||
|
|
@ -337,3 +332,18 @@ pinit()
|
|||
}
|
||||
return(dicetot);
|
||||
}
|
||||
|
||||
/*
|
||||
* init_everything:
|
||||
* Set up all important stuff.
|
||||
*/
|
||||
void
|
||||
init_everything(void)
|
||||
{
|
||||
init_player(); /* Roll up the rogue */
|
||||
init_things(); /* Set up probabilities */
|
||||
init_names(); /* Set up names of scrolls */
|
||||
init_colors(); /* Set up colors of potions */
|
||||
init_stones(); /* Set up stones in rings */
|
||||
init_materials(); /* Set up materials of wands */
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue