diff arogue5/sticks.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 c49f7927b0fa
children e52a8a7ad4c5
line wrap: on
line diff
--- a/arogue5/sticks.c	Sun Jan 31 13:45:07 2016 -0500
+++ b/arogue5/sticks.c	Sun Feb 07 14:39:21 2016 -0500
@@ -18,14 +18,13 @@
 #include <string.h>
 #include "rogue.h"
 
+void drain(int ymin, int ymax, int xmin, int xmax);
 
 /*
  * zap a stick and see what happens
  */
-do_zap(gotdir, which, flag)
-bool gotdir;
-int which;
-int flag;
+bool
+do_zap(bool gotdir, int which, int flag)
 {
     register struct linked_list *item;
     register struct object *obj = NULL;
@@ -683,8 +682,8 @@
  *	Do drain hit points from player shtick
  */
 
-drain(ymin, ymax, xmin, xmax)
-int ymin, ymax, xmin, xmax;
+void
+drain(int ymin, int ymax, int xmin, int xmax)
 {
     register int i, j, count;
     register struct thing *ick;
@@ -745,8 +744,8 @@
 /*
  * initialize a stick
  */
-fix_stick(cur)
-register struct object *cur;
+void
+fix_stick(struct object *cur)
 {
     if (EQUAL(ws_type[cur->o_which], "staff")) {
 	cur->o_weight = 100;
@@ -787,13 +786,9 @@
  * 	      given direction
  */
 
-shoot_bolt(shooter, start, dir, get_points, reason, name, damage)
-struct thing *shooter;
-coord start, dir;
-bool get_points;
-short reason;
-char *name;
-int damage;
+bool
+shoot_bolt(struct thing *shooter, coord start, coord dir, bool get_points, 
+           short reason, char *name, int damage)
 {
     register char dirch = 0, ch;
     register bool used, change;