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