diff xrogue/potions.c @ 220:f54901b9c39b

XRogue: convert to ANSI-style function declarations.
author John "Elwin" Edwards
date Wed, 02 Mar 2016 21:13:26 -0500
parents ce0cf824c192
children b67b99f6c92b
line wrap: on
line diff
--- a/xrogue/potions.c	Fri Feb 19 21:02:28 2016 -0500
+++ b/xrogue/potions.c	Wed Mar 02 21:13:26 2016 -0500
@@ -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
-add_constitution(change)
-int change;
+add_constitution(int change)
 {
     /* Do the potion */
     if (change < 0) {
@@ -76,8 +88,7 @@
  */
 
 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
-add_dexterity(change)
-int change;
+add_dexterity(int change)
 {
     int ring_str;       /* Value of ring strengths */
 
@@ -132,8 +142,8 @@
  *      add a haste to the player
  */
 
-add_haste(blessed)
-bool blessed;
+void
+add_haste(bool blessed)
 {
     int hasttime;
 
@@ -171,8 +181,7 @@
  */
 
 int
-add_intelligence(change)
-int change;
+add_intelligence(int change)
 {
     int ring_str;       /* Value of ring strengths */
 
@@ -203,7 +212,8 @@
  * 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 @@
  */
 
 int
-add_strength(change)
-int change;
+add_strength(int change)
 {
 
     if (change < 0) {
@@ -252,8 +261,7 @@
  */
 
 int
-add_wisdom(change)
-int change;
+add_wisdom(int change)
 {
     int ring_str;       /* Value of ring strengths */
 
@@ -280,11 +288,8 @@
     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 @@
                         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 @@
  */
 
 int
-res_dexterity(howmuch)
-int howmuch;
+res_dexterity(int howmuch)
 {
     short save_max;
     int ring_str;
@@ -975,8 +979,7 @@
  */
 
 int
-res_intelligence(howmuch)
-int howmuch;
+res_intelligence(int howmuch)
 {
     short save_max;
     int ring_str;
@@ -1004,8 +1007,7 @@
  */
 
 int
-res_wisdom(howmuch)
-int howmuch;
+res_wisdom(int howmuch)
 {
     short save_max;
     int ring_str;
@@ -1033,8 +1035,7 @@
  */
 
 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
-res_charisma(howmuch)
-int howmuch;
+res_charisma(int howmuch)
 {
     if (howmuch > 0)
         pstats.s_charisma =