]> git.cameronkatri.com Git - bsdgames-darwin.git/blobdiff - sail/pl_3.c
Comment out debugging build (it still randomly crashes though) pointed out
[bsdgames-darwin.git] / sail / pl_3.c
index 9b476f6c486caf852f3fc63864bd7feec47c3bf7..b638acc4158d597c732af91bfeb12085a8d6fc03 100644 (file)
@@ -1,4 +1,4 @@
-/*     $NetBSD: pl_3.c,v 1.9 2000/11/30 22:02:20 jwise Exp $   */
+/*     $NetBSD: pl_3.c,v 1.20 2009/03/15 03:33:56 dholland Exp $       */
 
 /*
  * Copyright (c) 1983, 1993
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *     This product includes software developed by the University of
- *     California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
 #if 0
 static char sccsid[] = "@(#)pl_3.c     8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: pl_3.c,v 1.9 2000/11/30 22:02:20 jwise Exp $");
+__RCSID("$NetBSD: pl_3.c,v 1.20 2009/03/15 03:33:56 dholland Exp $");
 #endif
 #endif /* not lint */
 
-#include "player.h"
+#include <signal.h>
 #include <stdlib.h>
+#include "extern.h"
+#include "player.h"
 
 void
-acceptcombat()
+acceptcombat(void)
 {
        int men = 0;
        int target, temp;
@@ -87,7 +85,8 @@ acceptcombat()
                        guns = mc->gunL;
                        car = mc->carL;
                }
-               if ((!guns && !car) || load == L_EMPTY || (ready & R_LOADED) == 0)
+               if ((!guns && !car) || load == L_EMPTY ||
+                   (ready & R_LOADED) == 0)
                        goto cant;
                if (mf->struck || !crew[2])
                        goto cant;
@@ -197,7 +196,7 @@ acceptcombat()
                                        hhits = 0;
                                }
                        }
-                       table(shootat, load, hit, closest, ms, roll);
+                       table(ms, closest, shootat, load, hit, roll);
                }
                Msg("Damage inflicted on the %s:", closest->shipname);
                Msg("\t%d HULL, %d GUNS, %d CREW, %d RIGGING",
@@ -213,13 +212,10 @@ acceptcombat()
        cant:
                Msg("Unable to fire %s broadside", r ? "right" : "left");
        }
-       blockalarm();
-       draw_stat();
-       unblockalarm();
 }
 
 void
-grapungrap()
+grapungrap(void)
 {
        struct ship *sp;
        int i;
@@ -234,8 +230,8 @@ grapungrap()
                case 'g':
                        if (dieroll() < 3
                            || ms->nationality == capship(sp)->nationality) {
-                               Write(W_GRAP, ms, sp->file->index, 0, 0, 0);
-                               Write(W_GRAP, sp, player, 0, 0, 0);
+                               send_grap(ms, sp->file->index);
+                               send_grap(sp, player);
                                Msg("Attempt succeeds!");
                                makesignal(ms, "grappled with $$", sp);
                        } else
@@ -259,7 +255,7 @@ grapungrap()
 }
 
 void
-unfoulplayer()
+unfoulplayer(void)
 {
        struct ship *to;
        int i;