⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lrscan.c

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 C
字号:
#ifndef lintstatic char sccsid[] = "@(#)lrscan.c	4.1	(Berkeley)	3/23/83";#endif not lint# include	"trek.h"/***  LONG RANGE OF SCANNERS****	A summary of the quadrants that surround you is printed.  The**	hundreds digit is the number of Klingons in the quadrant,**	the tens digit is the number of starbases, and the units digit**	is the number of stars.  If the printout is "///" it means**	that that quadrant is rendered uninhabitable by a supernova.**	It also updates the "scanned" field of the quadrants it scans,**	for future use by the "chart" option of the computer.*/lrscan(){	register int			i, j;	register struct quad		*q;	if (check_out(LRSCAN))	{		return;	}	printf("Long range scan for quadrant %d,%d\n\n", Ship.quadx, Ship.quady);	/* print the header on top */	for (j = Ship.quady - 1; j <= Ship.quady + 1; j++)	{		if (j < 0 || j >= NQUADS)			printf("      ");		else			printf("     %1d", j);	}	/* scan the quadrants */	for (i = Ship.quadx - 1; i <= Ship.quadx + 1; i++)	{		printf("\n  -------------------\n");		if (i < 0 || i >= NQUADS)		{			/* negative energy barrier */			printf("  !  *  !  *  !  *  !");			continue;		}		/* print the left hand margin */		printf("%1d !", i);		for (j = Ship.quady - 1; j <= Ship.quady + 1; j++)		{			if (j < 0 || j >= NQUADS)			{				/* negative energy barrier again */				printf("  *  !");				continue;			}			q = &Quad[i][j];			if (q->stars < 0)			{				/* supernova */				printf(" /// !");				q->scanned = 1000;				continue;			}			q->scanned = q->klings * 100 + q->bases * 10 + q->stars;			printf(" %3d !", q->scanned);		}	}	printf("\n  -------------------\n");	return;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -