# 2.11BSD#431 - /usr/src/games/trek/setwarp.c

##### Functions

    setwarp           X

       1: /*
       2:  * Copyright (c) 1980 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[] = "@(#)setwarp.c	5.1 (Berkeley) 5/30/85";
       9: #endif not lint
      10:
      11: # include   "trek.h"
      12: # include   "getpar.h"
      13:
      14: /*
      15: **  SET WARP FACTOR
      16: **
      17: **	The warp factor is set for future move commands.  It is
      18: **	checked for consistancy.
      19: */
      20:
      21: setwarp()
      22: {
      23:     double  warpfac;
      24:
      25:     warpfac = getfltpar("Warp factor");
      26:     if (warpfac < 0.0)
      27:         return;
      28:     if (warpfac < 1.0)
      29:         return (printf("Minimum warp speed is 1.0\n"));
      30:     if (warpfac > 10.0)
      31:         return (printf("Maximum speed is warp 10.0\n"));
      32:     if (warpfac > 6.0)
      33:         printf("Damage to warp engines may occur above warp 6.0\n");
      34:     Ship.warp = warpfac;
      35:     Ship.warp2 = Ship.warp * warpfac;
      36:     Ship.warp3 = Ship.warp2 * warpfac;
      37: }

#### Defined functions

setwarp defined in line 21; used 2 times

- in /usr/src/games/trek/play.c line 28, 55

#### 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: 439 |