diff arogue5/potions.c @ 218:56e748983fa8

Advanced Rogue 5: convert to ANSI function declarations. This still leaves over a thousand lines of warning messages, mostly related to the return types of daemons and fuses.
author John "Elwin" Edwards
date Sun, 07 Feb 2016 14:39:21 -0500
parents 34a87d84ea31
children
line wrap: on
line diff
--- a/arogue5/potions.c	Sun Jan 31 13:45:07 2016 -0500
+++ b/arogue5/potions.c	Sun Feb 07 14:39:21 2016 -0500
@@ -17,14 +17,16 @@
 #include <stdlib.h>
 #include <string.h>
 
+void res_intelligence(void);
+void res_wisdom(void);
 
 
 /*
  * Increase player's constitution
  */
 
-add_const(cursed)
-bool cursed;
+void
+add_const(bool cursed)
 {
     /* Do the potion */
     if (cursed) {
@@ -47,8 +49,8 @@
  * Increase player's dexterity
  */
 
-add_dexterity(cursed)
-bool cursed;
+void
+add_dexterity(bool cursed)
 {
     int ring_str;	/* Value of ring strengths */
 
@@ -80,8 +82,8 @@
  *	add a haste to the player
  */
 
-add_haste(blessed)
-bool blessed;
+void
+add_haste(bool blessed)
 {
     int hasttime;
 
@@ -110,8 +112,8 @@
 /*
  * Increase player's intelligence
  */
-add_intelligence(cursed)
-bool cursed;
+void
+add_intelligence(bool cursed)
 {
     int ring_str;	/* Value of ring strengths */
 
@@ -141,7 +143,8 @@
 /*
  * this routine makes the hero move slower 
  */
-add_slow()
+void
+add_slow(void)
 {
     if (on(player, ISHASTE)) { /* Already sped up */
 	extinguish(nohaste);
@@ -164,8 +167,8 @@
  * Increase player's strength
  */
 
-add_strength(cursed)
-bool cursed;
+void
+add_strength(bool cursed)
 {
 
     if (cursed) {
@@ -182,8 +185,8 @@
  * Increase player's wisdom
  */
 
-add_wisdom(cursed)
-bool cursed;
+void
+add_wisdom(bool cursed)
 {
     int ring_str;	/* Value of ring strengths */
 
@@ -215,8 +218,8 @@
  * Lower a level of experience 
  */
 
-lower_level(who)
-short who;
+void
+lower_level(short who)
 {
     int fewer, nsides = 0;
 
@@ -239,10 +242,8 @@
 	death(who);
 }
 
-quaff(which, flag, is_potion)
-int which;
-int flag;
-bool is_potion;
+void
+quaff(int which, int flag, bool is_potion)
 {
     register struct object *obj = NULL;
     register struct linked_list *item, *titem;
@@ -625,8 +626,8 @@
  *	if called with zero the restore fully
  */
 
-res_dexterity(howmuch)
-int howmuch;
+void
+res_dexterity(int howmuch)
 {
     short save_max;
     int ring_str;
@@ -656,7 +657,8 @@
  *	Restore player's intelligence
  */
 
-res_intelligence()
+void
+res_intelligence(void)
 {
     short save_max;
     int ring_str;
@@ -680,7 +682,8 @@
  *	Restore player's wisdom
  */
 
-res_wisdom()
+void
+res_wisdom(void)
 {
     short save_max;
     int ring_str;