Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!seismo!rochester!cornell!uw-beaver!tektronix!tekgen!tekred!games-request
From: games-request@tekred.TEK.COM
Newsgroups: comp.sources.games
Subject: v01i078:  xtrek - multiplayer space war for X-windows, Part06/06
Message-ID: <1371@tekred.TEK.COM>
Date: Thu, 2-Jul-87 16:56:33 EDT
Article-I.D.: tekred.1371
Posted: Thu Jul  2 16:56:33 1987
Date-Received: Sat, 4-Jul-87 10:58:12 EDT
Sender: billr@tekred.TEK.COM
Lines: 143
Approved: billr@tekred.TEK.COM

Submitted by: Chris Guthrie 
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 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#include 
X#include 
X#include 
X#include 
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 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#include 
X#include 
X#include 
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