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: #if !defined(lint) && defined(DOSCCS)
   8: static char sccsid[] = "@(#)lose.c	5.1.1 (2.11BSD GTE) 11/20/94";
   9: #endif
  10: 
  11: # include   "trek.h"
  12: # include   <setjmp.h>
  13: 
  14: /*
  15: **  PRINT OUT LOSER MESSAGES
  16: **
  17: **	The messages are printed out, the score is computed and
  18: **	printed, and the game is restarted.  Oh yeh, any special
  19: **	actions which need be taken are taken.
  20: */
  21: 
  22: char    *Losemsg[] =
  23: {
  24:     "You ran out of time",
  25:     "You ran out of energy",
  26:     "You have been destroyed",
  27:     "You ran into the negative energy barrier",
  28:     "You destroyed yourself by nova'ing that star",
  29:     "You have been caught in a supernova",
  30:     "You just suffocated in outer space",
  31:     "You could not be rematerialized",
  32:     "\n\032\014 *** Ship's hull has imploded ***",
  33:     "You have burned up in a star",
  34:     "Well, you destroyed yourself, but it didn't do any good",
  35:     "You have been captured by Klingons and mercilessly tortured",
  36:     "Your last crew member died",
  37: };
  38: 
  39: lose(why)
  40: int why;
  41: {
  42:     extern  jmp_buf env;
  43: 
  44:     Game.killed = 1;
  45:     sleep(1);
  46:     printf("\n%s\n", Losemsg[why - 1]);
  47:     switch (why)
  48:     {
  49: 
  50:       case L_NOTIME:
  51:         Game.killed = 0;
  52:         break;
  53:     }
  54:     Move.endgame = -1;
  55:     score();
  56:     skiptonl(0);
  57:     longjmp(env, 1);
  58: }

Defined functions

Defined variables

Losemsg defined in line 22; used 1 times
  • in line 46
sccsid defined in line 8; never used
Last modified: 1994-11-21
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2329
Valid CSS Valid XHTML 1.0 Strict