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

@ -20,6 +20,19 @@
#include <curses.h>
#include "rogue.h"
int add_charisma(int change);
int add_constitution(int change);
int add_dexterity(int change);
int add_intelligence(int change);
int add_strength(int change);
int add_wisdom(int change);
int res_charisma(int howmuch);
int res_constitution(int howmuch);
int res_dexterity(int howmuch);
int res_intelligence(int howmuch);
int res_wisdom(int howmuch);
/*
* add_abil is an array of functions used to change attributes. It must be
* ordered according to the attribute definitions in rogue.h.
@ -45,8 +58,7 @@ int (*res_abil[NUMABILITIES])() = {
*/
int
add_constitution(change)
int change;
add_constitution(int change)
{
/* Do the potion */
if (change < 0) {
@ -76,8 +88,7 @@ int change;
*/
int
add_charisma(change)
int change;
add_charisma(int change)
{
/* Do the potion */
if (change < 0) msg("You feel less attractive now.");
@ -99,8 +110,7 @@ int change;
*/
int
add_dexterity(change)
int change;
add_dexterity(int change)
{
int ring_str; /* Value of ring strengths */
@ -132,8 +142,8 @@ int change;
* add a haste to the player
*/
add_haste(blessed)
bool blessed;
void
add_haste(bool blessed)
{
int hasttime;
@ -171,8 +181,7 @@ bool blessed;
*/
int
add_intelligence(change)
int change;
add_intelligence(int change)
{
int ring_str; /* Value of ring strengths */
@ -203,7 +212,8 @@ int change;
* this routine makes the hero move slower
*/
add_slow()
void
add_slow(void)
{
/* monks cannot be slowed or hasted */
if (player.t_ctype == C_MONK || ISWEARING(R_FREEDOM)) {
@ -232,8 +242,7 @@ add_slow()
*/
int
add_strength(change)
int change;
add_strength(int change)
{
if (change < 0) {
@ -252,8 +261,7 @@ int change;
*/
int
add_wisdom(change)
int change;
add_wisdom(int change)
{
int ring_str; /* Value of ring strengths */
@ -280,11 +288,8 @@ int change;
return(0);
}
quaff(which, kind, flags, is_potion)
int which;
int kind;
int flags;
bool is_potion;
void
quaff(int which, int kind, int flags, bool is_potion)
{
register struct object *obj;
register struct linked_list *item, *titem;
@ -587,7 +592,7 @@ bool is_potion;
blessed ? "much " : "");
p_know[P_RAISE] = TRUE;
raise_level();
do_panic(NULL); /* this startles them */
do_panic(0); /* this startles them */
if (blessed) raise_level();
}
when P_HASTE:
@ -941,8 +946,7 @@ bool is_potion;
*/
int
res_dexterity(howmuch)
int howmuch;
res_dexterity(int howmuch)
{
short save_max;
int ring_str;
@ -975,8 +979,7 @@ int howmuch;
*/
int
res_intelligence(howmuch)
int howmuch;
res_intelligence(int howmuch)
{
short save_max;
int ring_str;
@ -1004,8 +1007,7 @@ int howmuch;
*/
int
res_wisdom(howmuch)
int howmuch;
res_wisdom(int howmuch)
{
short save_max;
int ring_str;
@ -1033,8 +1035,7 @@ int howmuch;
*/
int
res_constitution(howmuch)
int howmuch;
res_constitution(int howmuch)
{
if (howmuch > 0)
pstats.s_const = min(pstats.s_const + howmuch, max_stats.s_const);
@ -1048,8 +1049,7 @@ int howmuch;
*/
int
res_charisma(howmuch)
int howmuch;
res_charisma(int howmuch)
{
if (howmuch > 0)
pstats.s_charisma =