games-request@tekred.TEK.COM (07/02/87)
Submitted by: Chris Guthrie <chris%ic.Berkeley.EDU@ucbvax.berkeley.edu> Comp.sources.games: Volume 1, Issue 78 Archive-name: xtrek/Part06 #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh <file", e.g.. If this archive is complete, you # will see the following message at the end: # "End of archive 6 (of 6)." # Contents: getship.c warning.c # Wrapped by billr@tekred on Thu Jul 2 10:26:36 1987 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f getship.c -a "${1}" != "-c" ; then echo shar: Will not over-write existing file \"getship.c\" else echo shar: Extracting \"getship.c\" \(1253 characters\) sed "s/^X//" >getship.c <<'END_OF_getship.c' X X/* X X Copyright (c) 1986 Chris Guthrie X XPermission to use, copy, modify, and distribute this Xsoftware and its documentation for any purpose and without Xfee is hereby granted, provided that the above copyright Xnotice appear in all copies and that both that copyright Xnotice and this permission notice appear in supporting Xdocumentation. No representations are made about the Xsuitability of this software for any purpose. It is Xprovided "as is" without express or implied warranty. X X*/ X X#include <X/Xlib.h> X#include <stdio.h> X#include <sys/types.h> X#include <sys/ipc.h> X#include <sys/shm.h> X#include "defs.h" X#include "struct.h" X#include "data.h" X X/* fill in ship characteristics */ X Xgetship(shipp) Xstruct ship *shipp; X{ X shipp->s_turns = 128000; X shipp->s_accint = 100; X shipp->s_decint = 200; X shipp->s_accs = 100; X shipp->s_torpdamage = 30; X shipp->s_phaserdamage = 100; X shipp->s_torpspeed = 12; X shipp->s_maxspeed = 9; X shipp->s_repair = 100; X shipp->s_maxfuel = 10000; X shipp->s_detcost = 100; X shipp->s_torpcost = 10 * shipp->s_torpdamage; X shipp->s_phasercost = 10 * shipp->s_phaserdamage; X shipp->s_warpcost = 4; X shipp->s_cloakcost = 30; X shipp->s_recharge = 10; X shipp->s_maxarmies = 10; X} END_OF_getship.c if test 1253 -ne `wc -c <getship.c`; then echo shar: \"getship.c\" unpacked with wrong size! fi # end of overwriting check fi if test -f warning.c -a "${1}" != "-c" ; then echo shar: Will not over-write existing file \"warning.c\" else echo shar: Extracting \"warning.c\" \(1122 characters\) sed "s/^X//" >warning.c <<'END_OF_warning.c' X X/* X X Copyright (c) 1986 Chris Guthrie X XPermission to use, copy, modify, and distribute this Xsoftware and its documentation for any purpose and without Xfee is hereby granted, provided that the above copyright Xnotice appear in all copies and that both that copyright Xnotice and this permission notice appear in supporting Xdocumentation. No representations are made about the Xsuitability of this software for any purpose. It is Xprovided "as is" without express or implied warranty. X X*/ X X X#include <X/Xlib.h> X#include <stdio.h> X#include <math.h> X#include <signal.h> X#include "defs.h" X#include "struct.h" X#include "data.h" X X/* X** The warning in text will be printed in the warning window. X** The message will last WARNTIME/10 seconds unless another message X** comes through and overwrites it. X*/ Xwarning(text) Xchar *text; X{ X warntimer = udcounter + WARNTIME; /* set the line to be cleared */ X if (warncount > 0) X XPixSet(warnw, 5, 5, dfontinfo->width * warncount, dfontinfo->height, X backColor); X warncount = strlen(text); X XText(warnw, 5, 5, text, warncount, dfont, textColor, backColor); X XFlush(); X} END_OF_warning.c if test 1122 -ne `wc -c <warning.c`; then echo shar: \"warning.c\" unpacked with wrong size! fi # end of overwriting check fi echo shar: End of archive 6 \(of 6\). cp /dev/null ark6isdone MISSING="" for I in 1 2 3 4 5 6 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have unpacked all 6 archives. rm -f ark[1-9]isdone else echo You still need to unpack the following archives: echo " " ${MISSING} fi ## End of shell archive. exit 0