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 c

⟦3580758d5⟧ TextFile

    Length: 5632 (0x1600)
    Types: TextFile
    Names: »cross.c«

Derivation

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

TextFile


/********VERSION 1.4!!! (Files from different Versions are INCOMPATIBLE!*******/
/*******************************************************************************
********************************************************************************
********************************************************************************

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 "header.h"

drawcross(cp)
register struct player *cp;
{
int i;

for(i=1;i<10;++i)
{
poscurs(cp,20,i);
write(cp->fd, "                            |                            ",57); 
}
poscurs(cp,20,10);
write(cp->fd, "---------------------------   ---------------------------",57); 
for (i=11;i<20;++i)
{
poscurs(cp,20,i);
write(cp->fd, "                            |                            ",57); 
}
plotvitals(cp);
}


plotvitals(cp)
register struct player *cp;
{
int x1,x2,y1,y2,xx1,xx2,yy1,yy2;
cp->xvel=0;cp->yvel=0;
x1=cp->xpos-28;
x2=x1+57;
y1=cp->ypos-9;
y2=y1+19;
plot_screen(cp,x1,x2,y1,y2);
}


plot_screen(cp,x1,x2,y1,y2)
register struct player *cp;
register int x1,x2,y1,y2;
{
register int xnew,ynew;
register char c;
	
	int xx;

	plotposition(cp);

	for (i=y1; i<y2; ++i)
		{
		if ((xp=univ[i])==NULL) continue;
		do
		{
		if (((xx=xp->x)>=x1)&&(xx<=x2))
			{
		l=19-(i-y1);
		k=20+(xx-x1);
		if((k>19)&&(l>0)&&(k<77)&&(l<20))
				{
				poscurs(cp,k,l);
				write(cp->fd,&(xp->c),1);
				}
			} 
		if (xx>x2) xp=NULL;
			   else 
			   xp=xp->next_thing;
		}  while (xp!=NULL);
		} 
	
	player=startlist;

	while (player!=NULL)
	{
	if (cp==player)
			{
			player=player->next;
			continue;
			}
xnew=player->xpos;
ynew=player->ypos;
if (!(((c=inuniv(xnew,ynew))=='*')||(c=='O')||(c=='.')||(c=='@')))
	 {
			if (player->cloakingdevice==OFF)
			{
      if (player->stat<12)
	{
	l=19-(ynew-y1);
	if(((k=20+(xnew-x1))>19)&&(l>0)&&(k<77)&&(l<20))
					{
					poscurs(cp,k,l);
					write(cp->fd,&(player->id),1);
					}
				}
			}
	}
	player=player->next;
	}
}
   
drawconsole(cp)
register struct player *cp;
{
int i,j;

poscurs(cp,19,0); 
write(cp->fd,"******************MULTI-PLAYER-STAR-TREK*******************",59);
poscurs(cp,19,20); 
write(cp->fd,"********************MESSAGE WINDOW :***********************",59); 
poscurs(cp,19,23); 
write(cp->fd,"***********************************************************",59); 
for (i=1;  i<24; ++i) { poscurs(cp,19,i);
				write(cp->fd,"*",1); }
for (i=1;  i<24; ++i) { poscurs(cp,77,i); 
				write(cp->fd,"*",1); }
poscurs(cp,1,0); write(cp->fd,"SHIP'S  STATUS :",16);
poscurs(cp,1,1); write(cp->fd,"~~~~~~~~~~~~~~~~",16);
poscurs(cp,1,3); write(cp->fd,"QUAD:",5);
poscurs(cp,1,5); write(cp->fd,"WARP:",5);
poscurs(cp,1,7); write(cp->fd,"ENERGY (CU's):",14);
poscurs(cp,1,9); write(cp->fd,"MAX. ENERGY  :",14);
poscurs(cp,1,11);write(cp->fd,"WEAPONS STATUS :",16);
poscurs(cp,1,12);write(cp->fd,"~~~~~~~~~~~~~~~~",16);
poscurs(cp,1,14);write(cp->fd,"CLOAKING DEV.:",14);
poscurs(cp,2,16);write(cp->fd,"SHIELDS :",9);
poscurs(cp,1,18);write(cp->fd,"PHASER BANKS:",13);
poscurs(cp,1,19);write(cp->fd,"RANGE:",6);
poscurs(cp,10,19);write(cp->fd,"MAX:",4);
poscurs(cp,1,20);write(cp->fd,"PHOTON TORPS:",13);
poscurs(cp,1,21);write(cp->fd,"RANGE:",6);
poscurs(cp,10,21);write(cp->fd,"MAX:",4);
poscurs(cp,1,22);write(cp->fd,"STATUS:",7);
poscurs(cp,1,23);write(cp->fd,"SCORE :",7);
}

display_sheet(cp)
register struct player *cp;
{
poscurs(cp,20,1);
write(cp->fd, "~~~~~~~~~~~~~HELP FUNCTION & COMMAND SUMMARY~~~~~~~~~~~~~",57);
poscurs(cp,20,2);
write(cp->fd, "h,j,k,l => WARP DRIVE: left, down, up, right, movements. ",57); 
poscurs(cp,20,3);
write(cp->fd, "y,u,b,n => WARP DRIVE: diagonal movements. s => full stop",57); 
poscurs(cp,20,4);
write(cp->fd, " H,J,K,L,Y,U,B,N => Manoevering impulse engine movements ",57); 
poscurs(cp,20,5);
write(cp->fd, "   o => orbit, i => impulse thrusters to cancel orbit    ",57); 
poscurs(cp,20,6);
write(cp->fd, "      + => Quit, G => beep on/off, R => Redraw Screen    ",57); 
poscurs(cp,20,7);
write(cp->fd, "d,f => dock/undock, 1..9 => fire weapon, p => weapon sel.",57); 
poscurs(cp,20,8);
write(cp->fd, "    q => show exact quadrant,   e => show exact energy   ",57); 
poscurs(cp,20,9);
write(cp->fd, "      c => cloaking device on/off, v => shields on/off   ",57); 
poscurs(cp,20,10);
write(cp->fd, " t<1,2,3,4> => lock tractor beam, T => show tractor beams",57); 
poscurs(cp,20,11);
write(cp->fd, "  W => who is playing?, a<1,2,3,4> => auto-pilot to beam ",57); 
poscurs(cp,20,12);
write(cp->fd, " C<A> => Com link/send message, P<A> => send Prefix code ",57); 
poscurs(cp,20,13);
write(cp->fd, " S<A> => Scan ship on/off  (This will show prefix codes.)",57); 
poscurs(cp,20,14);
write(cp->fd, "   z => beam to/from planet,  ? => this help function.   ",57); 
poscurs(cp,20,15);
write(cp->fd, "                  Key to command notation :              ",57); 
poscurs(cp,20,16);
write(cp->fd, "       <1,2,3,4> => a number between 1-4 inclusive,      ",57);
poscurs(cp,20,17);
write(cp->fd, "    <A> => a shipname in the form of a lower case letter ",57); 
poscurs(cp,20,18);
write(cp->fd, "NB : If a function doesn't seem to work, you cannot do it",57); 
poscurs(cp,20,19);
write(cp->fd, "while you are in that particular status. PRESS ANY KEY ->",57); 
}