亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? computer.c

?? <B>Digital的Unix操作系統VAX 4.2源碼</B>
?? C
字號:
#ifndef lintstatic char sccsid[] = "@(#)computer.c	4.2	(Berkeley)	5/27/83";#endif not lint# include	"trek.h"# include	"getpar.h"# include	<stdio.h>/***  On-Board Computer****	A computer request is fetched from the captain.  The requests**	are:****	chart -- print a star chart of the known galaxy.  This includes**		every quadrant that has ever had a long range or**		a short range scan done of it, plus the location of**		all starbases.  This is of course updated by any sub-**		space radio broadcasts (unless the radio is out).**		The format is the same as that of a long range scan**		except that ".1." indicates that a starbase exists**		but we know nothing else.****	trajectory -- gives the course and distance to every know**		Klingon in the quadrant.  Obviously this fails if the**		short range scanners are out.****	course -- gives a course computation from whereever you are**		to any specified location.  If the course begins**		with a slash, the current quadrant is taken.**		Otherwise the input is quadrant and sector coordi-**		nates of the target sector.****	move -- identical to course, except that the move is performed.****	score -- prints out the current score.****	pheff -- "PHaser EFFectiveness" at a given distance.  Tells**		you how much stuff you need to make it work.****	warpcost -- Gives you the cost in time and units to move for**		a given distance under a given warp speed.****	impcost -- Same for the impulse engines.****	distresslist -- Gives a list of the currently known starsystems**		or starbases which are distressed, together with their**		quadrant coordinates.****	If a command is terminated with a semicolon, you remain in**	the computer; otherwise, you escape immediately to the main**	command processor.*/struct cvntab	Cputab[] ={	"ch",			"art",			(int (*)())1,		0,	"t",			"rajectory",		(int (*)())2,		0,	"c",			"ourse",		(int (*)())3,		0,	"m",			"ove",			(int (*)())3,		1,	"s",			"core",			(int (*)())4,		0,	"p",			"heff",			(int (*)())5,		0,	"w",			"arpcost",		(int (*)())6,		0,	"i",			"mpcost",		(int (*)())7,		0,	"d",			"istresslist",		(int (*)())8,		0,	0};computer(){	int			ix, iy;	register int		i, j;	int			numout;	int			tqx, tqy;	struct cvntab		*r;	int			cost;	int			course;	double			dist, time;	double			warpfact;	struct quad		*q;	register struct event	*e;	if (check_out(COMPUTER))		return;	while (1)	{		r = getcodpar("\nRequest", Cputab);		switch ((int)r->value)		{		  case 1:			/* star chart */			printf("Computer record of galaxy for all long range sensor scans\n\n");			printf("  ");			/* print top header */			for (i = 0; i < NQUADS; i++)				printf("-%d- ", i);			printf("\n");			for (i = 0; i < NQUADS; i++)			{				printf("%d ", i);				for (j = 0; j < NQUADS; j++)				{					if (i == Ship.quadx && j == Ship.quady)					{						printf("$$$ ");						continue;					}					q = &Quad[i][j];					/* 1000 or 1001 is special case */					if (q->scanned >= 1000)						if (q->scanned > 1000)							printf(".1. ");						else							printf("/// ");					else						if (q->scanned < 0)							printf("... ");						else							printf("%3d ", q->scanned);				}				printf("%d\n", i);			}			printf("  ");			/* print bottom footer */			for (i = 0; i < NQUADS; i++)				printf("-%d- ", i);			printf("\n");			break;		  case 2:			/* trajectory */			if (check_out(SRSCAN))			{				break;			}			if (Etc.nkling <= 0)			{				printf("No Klingons in this quadrant\n");				break;			}			/* for each Klingon, give the course & distance */			for (i = 0; i < Etc.nkling; i++)			{				printf("Klingon at %d,%d", Etc.klingon[i].x, Etc.klingon[i].y);				course = kalc(Ship.quadx, Ship.quady, Etc.klingon[i].x, Etc.klingon[i].y, &dist);				prkalc(course, dist);			}			break;		  case 3:			/* course calculation */			if (readdelim('/'))			{				tqx = Ship.quadx;				tqy = Ship.quady;			}			else			{				ix = getintpar("Quadrant");				if (ix < 0 || ix >= NSECTS)					break;				iy = getintpar("q-y");				if (iy < 0 || iy >= NSECTS)					break;				tqx = ix;				tqy = iy;			}			ix = getintpar("Sector");			if (ix < 0 || ix >= NSECTS)				break;			iy = getintpar("s-y");			if (iy < 0 || iy >= NSECTS)				break;			course = kalc(tqx, tqy, ix, iy, &dist);			if (r->value2)			{				warp(-1, course, dist);				break;			}			printf("%d,%d/%d,%d to %d,%d/%d,%d",				Ship.quadx, Ship.quady, Ship.sectx, Ship.secty, tqx, tqy, ix, iy);			prkalc(course, dist);			break;		  case 4:			/* score */			score();			break;		  case 5:			/* phaser effectiveness */			dist = getfltpar("range");			if (dist < 0.0)				break;			dist *= 10.0;			cost = pow(0.90, dist) * 98.0 + 0.5;			printf("Phasers are %d%% effective at that range\n", cost);			break;		  case 6:			/* warp cost (time/energy) */			dist = getfltpar("distance");			if (dist < 0.0)				break;			warpfact = getfltpar("warp factor");			if (warpfact <= 0.0)				warpfact = Ship.warp;			cost = (dist + 0.05) * warpfact * warpfact * warpfact;			time = Param.warptime * dist / (warpfact * warpfact);			printf("Warp %.2f distance %.2f cost %.2f stardates %d (%d w/ shlds up) units\n",				warpfact, dist, time, cost, cost + cost);			break;		  case 7:			/* impulse cost */			dist = getfltpar("distance");			if (dist < 0.0)				break;			cost = 20 + 100 * dist;			time = dist / 0.095;			printf("Distance %.2f cost %.2f stardates %d units\n",				dist, time, cost);			break;		  case 8:			/* distresslist */			j = 1;			printf("\n");			/* scan the event list */			for (i = 0; i < MAXEVENTS; i++)			{				e = &Event[i];				/* ignore hidden entries */				if (e->evcode & E_HIDDEN)					continue;				switch (e->evcode & E_EVENT)				{				  case E_KDESB:					printf("Klingon is attacking starbase in quadrant %d,%d\n",						e->x, e->y);					j = 0;					break;				  case E_ENSLV:				  case E_REPRO:					printf("Starsystem %s in quadrant %d,%d is distressed\n",						systemname(e), e->x, e->y);					j = 0;					break;				}			}			if (j)				printf("No known distress calls are active\n");			break;		}		/* skip to next semicolon or newline.  Semicolon		 * means get new computer request; newline means		 * exit computer mode. */		while ((i = cgetc(0)) != ';')		{			if (i == '\0')				exit(1);			if (i == '\n')			{				ungetc(i, stdin);				return;			}		}	}}/***  Course Calculation****	Computes and outputs the course and distance from position**	sqx,sqy/ssx,ssy to tqx,tqy/tsx,tsy.*/kalc(tqx, tqy, tsx, tsy, dist)int	tqx;int	tqy;int	tsx;int	tsy;double	*dist;{	double			dx, dy;	double			quadsize;	double			angle;	register int		course;	/* normalize to quadrant distances */	quadsize = NSECTS;	dx = (Ship.quadx + Ship.sectx / quadsize) - (tqx + tsx / quadsize);	dy = (tqy + tsy / quadsize) - (Ship.quady + Ship.secty / quadsize);	/* get the angle */	angle = atan2(dy, dx);	/* make it 0 -> 2 pi */	if (angle < 0.0)		angle += 6.283185307;	/* convert from radians to degrees */	course = angle * 57.29577951 + 0.5;	dx = dx * dx + dy * dy;	*dist = sqrt(dx);	return (course);}prkalc(course, dist)int	course;double	dist;{	printf(": course %d  dist %.3f\n", course, dist);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产乱妇无码大片在线观看| 欧美性欧美巨大黑白大战| 不卡视频一二三| 欧美喷水一区二区| 国产三级精品三级| 亚洲www啪成人一区二区麻豆| 国产不卡视频在线观看| 欧美一区日韩一区| 亚洲免费观看在线观看| 国产91综合网| 久久久久久久性| 图片区小说区国产精品视频| 91在线看国产| 国产精品欧美极品| 国精产品一区一区三区mba桃花 | 亚洲精品视频在线看| 韩国av一区二区三区四区 | 日韩国产在线一| 91精品1区2区| 最新成人av在线| 高清beeg欧美| 欧美激情综合五月色丁香小说| 激情久久久久久久久久久久久久久久| 欧美日韩亚洲综合一区| 一区二区久久久久| 97精品久久久久中文字幕 | 一区二区不卡在线播放| 99久久国产综合精品麻豆| 中文字幕一区二区三区乱码在线| 国产69精品久久777的优势| 国产欧美在线观看一区| 国产精品18久久久久久久久| 精品少妇一区二区三区在线视频| 美国精品在线观看| 欧美电影免费观看完整版| 久久成人免费网| 久久青草国产手机看片福利盒子| 国产在线不卡一卡二卡三卡四卡| 亚洲精品一区二区在线观看| 国产精品伊人色| 国产精品欧美综合在线| av午夜一区麻豆| 一区二区三区欧美| 欧美另类videos死尸| 久久97超碰国产精品超碰| 欧美精品一区二区高清在线观看| 国产精品自拍av| 中文字幕字幕中文在线中不卡视频| 91女神在线视频| 亚洲成人精品一区二区| 日韩一级成人av| 国产精一区二区三区| 综合久久国产九一剧情麻豆| 在线观看国产91| 亚洲一级二级三级| 精品国产在天天线2019| 久久久一区二区三区| 色猫猫国产区一区二在线视频| 99久久久免费精品国产一区二区| 国产精品免费网站在线观看| 97精品电影院| 婷婷中文字幕一区三区| 久久精品亚洲麻豆av一区二区| 成人综合婷婷国产精品久久| 一级日本不卡的影视| 日韩欧美视频在线| 不卡视频免费播放| 日本aⅴ亚洲精品中文乱码| 久久久国产一区二区三区四区小说 | 亚洲日本电影在线| 欧美精品高清视频| 国产超碰在线一区| 午夜精品福利视频网站| 国产欧美一区二区三区沐欲| 91成人国产精品| 国产乱子伦一区二区三区国色天香| 国产精品久久久久影院| 欧美一区二视频| av色综合久久天堂av综合| 另类小说色综合网站| 樱桃国产成人精品视频| 亚洲精品一区二区在线观看| 欧美色综合天天久久综合精品| 久久精品国产**网站演员| 亚洲免费视频成人| 国产日韩欧美高清| 欧美日韩国产经典色站一区二区三区 | 国产剧情av麻豆香蕉精品| 综合久久国产九一剧情麻豆| 精品裸体舞一区二区三区| 日韩欧美国产一区二区三区| 91蜜桃婷婷狠狠久久综合9色| 美女尤物国产一区| 亚洲va国产天堂va久久en| 亚洲少妇最新在线视频| 国产无一区二区| 欧美岛国在线观看| 91精品欧美一区二区三区综合在| 91丨九色丨黑人外教| 成人精品免费看| 久99久精品视频免费观看| 午夜精品福利一区二区蜜股av| 亚洲免费观看高清完整版在线 | 亚洲免费色视频| 国产精品欧美一区喷水| 久久久久9999亚洲精品| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 日韩av电影天堂| 亚洲五月六月丁香激情| 亚洲色图制服丝袜| 国产精品乱人伦| 日本一区二区成人| 国产人妖乱国产精品人妖| 久久久一区二区三区捆绑**| 精品久久久久久久久久久久包黑料| 欧美日韩在线播| 欧美日韩视频在线观看一区二区三区 | 91精品一区二区三区在线观看| 在线观看日韩毛片| 最新中文字幕一区二区三区 | 成人一区二区视频| 成人黄色免费短视频| av在线不卡观看免费观看| 99九九99九九九视频精品| 91蜜桃在线免费视频| 欧美日韩午夜精品| 欧美白人最猛性xxxxx69交| 精品久久久久av影院| 国产亚洲精品bt天堂精选| 中文字幕在线不卡一区| 亚洲激情五月婷婷| 午夜精品一区在线观看| 日本欧美在线观看| 国产精品中文字幕日韩精品 | 欧美日韩成人综合在线一区二区| 91麻豆精品国产91久久久久 | 欧美视频完全免费看| 欧美电影影音先锋| 精品国免费一区二区三区| 国产精品女主播在线观看| 亚洲一区在线观看视频| 美女一区二区视频| 成人av在线观| 欧美日韩精品免费| 久久婷婷国产综合精品青草| 中文字幕一区二区不卡 | 国产尤物一区二区在线| 国产精品资源网站| 在线观看www91| 精品成a人在线观看| 亚洲欧美中日韩| 天天av天天翘天天综合网| 国产乱子轮精品视频| 色菇凉天天综合网| 日韩一区二区三区三四区视频在线观看 | 国产精品传媒入口麻豆| 五月激情六月综合| 丰满白嫩尤物一区二区| 欧美日韩一区二区在线观看 | 亚洲欧洲精品天堂一级| 视频一区视频二区在线观看| 国产成人精品免费视频网站| 精品视频999| 1区2区3区欧美| 久久er99热精品一区二区| 99久久99久久精品免费看蜜桃| 欧美一区二区高清| 亚洲日本欧美天堂| 国产专区欧美精品| 精品视频在线免费| 综合久久综合久久| 国产风韵犹存在线视精品| 欧美日韩成人一区二区| 亚洲色图视频网站| 国产精品亚洲一区二区三区在线 | 久久久久久久久99精品| 亚洲成人综合在线| 99re视频这里只有精品| 久久久久九九视频| 日韩成人一级大片| 欧美性视频一区二区三区| 中文字幕欧美激情一区| 另类成人小视频在线| 欧美日韩国产影片| 亚洲综合999| 97久久精品人人爽人人爽蜜臀| 久久亚洲精品小早川怜子| 婷婷久久综合九色国产成人| 色中色一区二区| 亚洲色图清纯唯美| 99re在线视频这里只有精品| 国产精品沙发午睡系列990531| 国产一二三精品| 精品久久久久久最新网址| 久久精品国产99久久6| 亚洲精品一区二区三区精华液| 免费精品99久久国产综合精品| 欧美顶级少妇做爰| 日韩中文字幕91| 亚洲免费观看高清完整版在线观看 |