diff arogue7/potions.c @ 219:f9ef86cf22b2

Advanced Rogue 7: convert to ANSI-style function declarations. Almost 1500 lines of compiler warnings remain, and the GCC developers are already working on a new version with even more warnings turned on by default.
author John "Elwin" Edwards
date Fri, 19 Feb 2016 21:02:28 -0500
parents f057f09e9945
children e1cd27c5464f
line wrap: on
line diff
--- a/arogue7/potions.c	Sun Feb 07 14:39:21 2016 -0500
+++ b/arogue7/potions.c	Fri Feb 19 21:02:28 2016 -0500
@@ -46,8 +46,7 @@
  */
 
 void
-add_constitution(change)
-int change;
+add_constitution(int change)
 {
     /* Do the potion */
     if (change < 0) {
@@ -71,8 +70,7 @@
  */
 
 void
-add_charisma(change)
-int change;
+add_charisma(int change)
 {
     /* Do the potion */
     if (change < 0) msg("You feel less attractive now.");
@@ -92,8 +90,7 @@
  */
 
 void
-add_dexterity(change)
-int change;
+add_dexterity(int change)
 {
     int ring_str;	/* Value of ring strengths */
 
@@ -123,8 +120,8 @@
  *	add a haste to the player
  */
 
-add_haste(blessed)
-bool blessed;
+void
+add_haste(bool blessed)
 {
     int hasttime;
 
@@ -161,8 +158,7 @@
  * Increase player's intelligence
  */
 void
-add_intelligence(change)
-int change;
+add_intelligence(int change)
 {
     int ring_str;	/* Value of ring strengths */
 
@@ -190,7 +186,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)) { 
@@ -219,8 +216,7 @@
  */
 
 void
-add_strength(change)
-int change;
+add_strength(int change)
 {
 
     if (change < 0) {
@@ -238,8 +234,7 @@
  */
 
 void
-add_wisdom(change)
-int change;
+add_wisdom(int change)
 {
     int ring_str;	/* Value of ring strengths */
 
@@ -264,11 +259,8 @@
 	pstats.s_wisdom += ring_str;
 }
 
-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;
@@ -869,8 +861,7 @@
  */
 
 void
-res_dexterity(howmuch)
-int howmuch;
+res_dexterity(int howmuch)
 {
     short save_max;
     int ring_str;
@@ -903,8 +894,7 @@
  */
 
 void
-res_intelligence(howmuch)
-int howmuch;
+res_intelligence(int howmuch)
 {
     short save_max;
     int ring_str;
@@ -931,8 +921,7 @@
  */
 
 void
-res_wisdom(howmuch)
-int howmuch;
+res_wisdom(int howmuch)
 {
     short save_max;
     int ring_str;
@@ -959,8 +948,7 @@
  */
 
 void
-res_constitution(howmuch)
-int howmuch;
+res_constitution(int howmuch)
 {
     if (howmuch > 0)
 	pstats.s_const = min(pstats.s_const + howmuch, max_stats.s_const);
@@ -972,8 +960,7 @@
  */
 
 void
-res_charisma(howmuch)
-int howmuch;
+res_charisma(int howmuch)
 {
     if (howmuch > 0)
 	pstats.s_charisma =