DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T s

⟦a4f018c27⟧ TextFile

    Length: 6206 (0x183e)
    Types: TextFile
    Names: »scan.c.orig«

Derivation

└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
    └─⟦this⟧ »EUUGD18/General/Mpss/scan.c.orig« 

TextFile


/*******************************************************************************
********************************************************************************
********************************************************************************

PERMISSION TO COPY THIS SOFTWARE IS HEREBY GIVEN BY THE AUTHOR PROVIDED THAT
THIS LEADING MESSAGE IS INCLUDED IN ALL OF THE RELEVANT SOURCE FILES.

		P. SCHMITZ, UNIVERSITY OF KEELE, MAY 1988.


********************************************************************************
********************************************************************************
*******************************************************************************/

#include "ships.h"
#include "header.h"

scan(cp,o)
register struct player *cp,*o;
{
char string[37];

plot1(cp,"                        Scanning Sir.                    ");
plot2(cp,"                                                         ");
if (o->energy<200)
{
plot1(o," Spock : Captain, we are being exposed to an energy beam ");
plot2(o," of unknown constituency. It seems we have been scanned. ");
}
poscurs(cp,20,1);
write(cp->fd, "                                                         ",57); 
poscurs(cp,20,2);
write(cp->fd, "                  ~~~~~~~~~~~~~~~~~~~~~~~~~              ",57); 
poscurs(cp,20,3);
write(cp->fd, "                  Remote Subspace Ship Scan              ",57); 
poscurs(cp,20,4);
write(cp->fd, "                  ~~~~~~~~~~~~~~~~~~~~~~~~~              ",57); 
poscurs(cp,20,5);
write(cp->fd, "                                                         ",57); 
poscurs(cp,20,6);
write(cp->fd, "     Name of Ship : ",20); 
switch (o->id)
	{
	case ROMID :
	         write(cp->fd,"Names of Romulan vessels are secret. ",37);
		 break;
	case KLINGID :
	         write(cp->fd,"Names of Klingon vessels are secret. ",37);
		 break;
	default: write(cp->fd,ship[o->shipno].name,37);
		 break;
	}
poscurs(cp,20,7);
write(cp->fd, "     Registration : ",20); 
switch (o->id)
	{
	case ROMID :
	         write(cp->fd,"Registrations of Romulans are secret.",37);
		 break;
	case KLINGID :
	         write(cp->fd,"Registrations of Klingons are secret.",37);
		 break;
	default: 
		 write(cp->fd,ship[o->shipno].registration,37);
		 break;
	}
poscurs(cp,20,8);
write(cp->fd, "     Class        : ",20); 
switch (o->id)
	{
	case ROMID :
	         write(cp->fd,"Heavy Romulan Battle Cruiser.        ",37);
		 break;
	case KLINGID :
	         write(cp->fd,"Klingon Battle Destroyer Class A.    ",37);
		 break;
	default: 
		 write(cp->fd,ship[o->shipno].class,37);
		 break;
	}
poscurs(cp,20,9);
write(cp->fd, "     Origin       : ",20); 
switch (o->id)
	{
	case ROMID :
	         write(cp->fd,"Romulan Sector.                      ",37);
		 break;
	case KLINGID :
	         write(cp->fd,"Klingon empire, klingon sector.      ",37);
		 break;
	default: 
		 write(cp->fd,ship[o->shipno].flag,37);
		 break;
	}
poscurs(cp,20,10);
write(cp->fd, "     No. of crew  : ",20); 
switch (o->id)
	{
	case ROMID :
	         write(cp->fd,"unknown.                             ",37);
		 break;
	case KLINGID :
	         write(cp->fd,"unknown.                             ",37);
		 break;
	default: 
		 write(cp->fd,ship[o->shipno].noofcrew,37);
		 break;
	}
poscurs(cp,20,11);
write(cp->fd, "     Prefix Code  : ",20); 
switch (o->id)
	{
	case ROMID :
	         write(cp->fd,"unknown.                             ",37);
		 break;
	case KLINGID :
	         write(cp->fd,"unknown.                             ",37);
		 break;
	default: 
		 write(cp->fd,ship[o->shipno].prefixcode,37);
		 break;
	}
poscurs(cp,20,12);
write(cp->fd, "     Current Pos. : ",20); 
sprintf(string,"%3d %3d                             ",o->xpos,o->ypos);
write(cp->fd,string,37);
poscurs(cp,20,13);
write(cp->fd, "     Current Warp : ",20); 
sprintf(string,"%3d %3d                             ",o->xvel,o->yvel);
write(cp->fd,string,37);
poscurs(cp,20,14);
write(cp->fd, "     Energy       : ",20); 
switch (o->id)
	{
	case ROMID :
	         sprintf(string,"unknown.                             ");
		 break;
	case KLINGID :
	         sprintf(string,"unknown.                             ");
		 break;
	default: 
		sprintf(string,"   %4d                             ",o->energy);
		 break;
	}
write(cp->fd,string,37);
poscurs(cp,20,15);
write(cp->fd, "     Max. Energy  : ",20); 
switch (o->id)
	{
	case ROMID :
	         sprintf(string,"unknown.                             ");
		 break;
	case KLINGID :
	         sprintf(string,"unknown.                             ");
		 break;
	default: 
	sprintf(string,"   %4d                             ",o->maxenergy);
		 break;
	}
write(cp->fd,string,37);
poscurs(cp,20,16);
write(cp->fd, "     Phaser shots : ",20); 
switch (o->id)
	{
	case ROMID :
	         sprintf(string,"unknown.                             ");
		 break;
	case KLINGID :
	         sprintf(string,"unknown.                             ");
		 break;
	default: 
	sprintf(string,"   %4d                             ",o->phaserbanks);
		 break;
	}
write(cp->fd,string,37);
poscurs(cp,20,17);
write(cp->fd, "     Phaser range : ",20); 
switch (o->id)
	{
	case ROMID :
	         sprintf(string,"Far enough to get you!!              ");
		 break;
	case KLINGID :
	         sprintf(string,"Far enough to get you!!              ");
		 break;
	default: 
	sprintf(string,"   %4d                             ",o->phaserreach);
		 break;
	}
write(cp->fd,string,37);
poscurs(cp,20,18);
write(cp->fd, "     Photon shots : ",20); 
switch (o->id)
	{
	case ROMID :
	         sprintf(string,"unknown.                             ");
		 break;
	case KLINGID :
	         sprintf(string,"unknown.                             ");
		 break;
	default: 
	sprintf(string,"   %4d                             ",o->photontorpedos);
		 break;
	}
write(cp->fd,string,37);
poscurs(cp,20,19);
write(cp->fd, "     Photon range : ",20); 
switch (o->id)
	{
	case ROMID :
	         sprintf(string,"Too far for comfort.                 ");
		 break;
	case KLINGID :
	         sprintf(string,"Too far for comfort.                 ");
		 break;
	default: 
	sprintf(string,"   %4d                             ",o->photonreach);
		 break;
	}
write(cp->fd,string,37);
}