1: /*
   2:  * Copyright (c) 1983 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  */
   6: 
   7: #ifndef lint
   8: static char sccsid[] = "@(#)parties.c	5.1 (Berkeley) 5/29/85";
   9: #endif not lint
  10: 
  11: #include "externs.h"
  12: 
  13: meleeing(from, to)
  14: struct ship *from;
  15: register struct ship *to;
  16: {
  17:     register struct BP *p = from->file->OBP;
  18:     register struct BP *q = p + NBP;
  19: 
  20:     for (; p < q; p++)
  21:         if (p->turnsent && p->toship == to)
  22:             return 1;
  23:     return 0;
  24: }
  25: 
  26: boarding(from, isdefense)
  27: register struct ship *from;
  28: char isdefense;
  29: {
  30:     register struct BP *p = isdefense ? from->file->DBP : from->file->OBP;
  31:     register struct BP *q = p + NBP;
  32: 
  33:     for (; p < q; p++)
  34:         if (p->turnsent)
  35:             return 1;
  36:     return 0;
  37: }
  38: 
  39: unboard(ship, to, isdefense)
  40: register struct ship *ship, *to;
  41: register char isdefense;
  42: {
  43:     register struct BP *p = isdefense ? ship->file->DBP : ship->file->OBP;
  44:     register n;
  45: 
  46:     for (n = 0; n < NBP; p++, n++)
  47:         if (p->turnsent && (p->toship == to || isdefense || ship == to))
  48:             Write(isdefense ? W_DBP : W_OBP, ship, 0, n, 0, 0, 0);
  49: }

Defined functions

boarding defined in line 26; used 2 times
meleeing defined in line 13; used 6 times
unboard defined in line 39; used 16 times

Defined variables

sccsid defined in line 8; never used
Last modified: 1985-05-30
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1671
Valid CSS Valid XHTML 1.0 Strict