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

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

?? id_us_1.c

?? Wolf 3D official source code.
?? C
?? 第 1 頁 / 共 2 頁
字號:

	USL_PrintInCenter(s,r);
}

///////////////////////////////////////////////////////////////////////////
//
//	US_CPrintLine() - Prints a string centered on the current line and
//		advances to the next line. Newlines are not supported.
//
///////////////////////////////////////////////////////////////////////////
void
US_CPrintLine(char far *s)
{
	word	w,h;

	USL_MeasureString(s,&w,&h);

	if (w > WindowW)
		Quit("US_CPrintLine() - String exceeds width");
	px = WindowX + ((WindowW - w) / 2);
	py = PrintY;
	USL_DrawString(s);
	PrintY += h;
}

///////////////////////////////////////////////////////////////////////////
//
//	US_CPrint() - Prints a string in the current window. Newlines are
//		supported.
//
///////////////////////////////////////////////////////////////////////////
void
US_CPrint(char far *s)
{
	char	c,far *se;

	while (*s)
	{
		se = s;
		while ((c = *se) && (c != '\n'))
			se++;
		*se = '\0';

		US_CPrintLine(s);

		s = se;
		if (c)
		{
			*se = c;
			s++;
		}
	}
}

///////////////////////////////////////////////////////////////////////////
//
//	US_ClearWindow() - Clears the current window to white and homes the
//		cursor
//
///////////////////////////////////////////////////////////////////////////
void
US_ClearWindow(void)
{
	VWB_Bar(WindowX,WindowY,WindowW,WindowH,WHITE);
	PrintX = WindowX;
	PrintY = WindowY;
}

///////////////////////////////////////////////////////////////////////////
//
//	US_DrawWindow() - Draws a frame and sets the current window parms
//
///////////////////////////////////////////////////////////////////////////
void
US_DrawWindow(word x,word y,word w,word h)
{
	word	i,
			sx,sy,sw,sh;

	WindowX = x * 8;
	WindowY = y * 8;
	WindowW = w * 8;
	WindowH = h * 8;

	PrintX = WindowX;
	PrintY = WindowY;

	sx = (x - 1) * 8;
	sy = (y - 1) * 8;
	sw = (w + 1) * 8;
	sh = (h + 1) * 8;

	US_ClearWindow();

	VWB_DrawTile8(sx,sy,0),VWB_DrawTile8(sx,sy + sh,5);
	for (i = sx + 8;i <= sx + sw - 8;i += 8)
		VWB_DrawTile8(i,sy,1),VWB_DrawTile8(i,sy + sh,6);
	VWB_DrawTile8(i,sy,2),VWB_DrawTile8(i,sy + sh,7);

	for (i = sy + 8;i <= sy + sh - 8;i += 8)
		VWB_DrawTile8(sx,i,3),VWB_DrawTile8(sx + sw,i,4);
}

///////////////////////////////////////////////////////////////////////////
//
//	US_CenterWindow() - Generates a window of a given width & height in the
//		middle of the screen
//
///////////////////////////////////////////////////////////////////////////
void
US_CenterWindow(word w,word h)
{
	US_DrawWindow(((MaxX / 8) - w) / 2,((MaxY / 8) - h) / 2,w,h);
}

///////////////////////////////////////////////////////////////////////////
//
//	US_SaveWindow() - Saves the current window parms into a record for
//		later restoration
//
///////////////////////////////////////////////////////////////////////////
void
US_SaveWindow(WindowRec *win)
{
	win->x = WindowX;
	win->y = WindowY;
	win->w = WindowW;
	win->h = WindowH;

	win->px = PrintX;
	win->py = PrintY;
}

///////////////////////////////////////////////////////////////////////////
//
//	US_RestoreWindow() - Sets the current window parms to those held in the
//		record
//
///////////////////////////////////////////////////////////////////////////
void
US_RestoreWindow(WindowRec *win)
{
	WindowX = win->x;
	WindowY = win->y;
	WindowW = win->w;
	WindowH = win->h;

	PrintX = win->px;
	PrintY = win->py;
}

//	Input routines

///////////////////////////////////////////////////////////////////////////
//
//	USL_XORICursor() - XORs the I-bar text cursor. Used by US_LineInput()
//
///////////////////////////////////////////////////////////////////////////
static void
USL_XORICursor(int x,int y,char *s,word cursor)
{
	static	boolean	status;		// VGA doesn't XOR...
	char	buf[MaxString];
	int		temp;
	word	w,h;

	strcpy(buf,s);
	buf[cursor] = '\0';
	USL_MeasureString(buf,&w,&h);

	px = x + w - 1;
	py = y;
	if (status^=1)
		USL_DrawString("\x80");
	else
	{
		temp = fontcolor;
		fontcolor = backcolor;
		USL_DrawString("\x80");
		fontcolor = temp;
	}

}

///////////////////////////////////////////////////////////////////////////
//
//	US_LineInput() - Gets a line of user input at (x,y), the string defaults
//		to whatever is pointed at by def. Input is restricted to maxchars
//		chars or maxwidth pixels wide. If the user hits escape (and escok is
//		true), nothing is copied into buf, and false is returned. If the
//		user hits return, the current string is copied into buf, and true is
//		returned
//
///////////////////////////////////////////////////////////////////////////
boolean
US_LineInput(int x,int y,char *buf,char *def,boolean escok,
				int maxchars,int maxwidth)
{
	boolean		redraw,
				cursorvis,cursormoved,
				done,result;
	ScanCode	sc;
	char		c,
				s[MaxString],olds[MaxString];
	word		i,
				cursor,
				w,h,
				len,temp;
	longword	lasttime;

	if (def)
		strcpy(s,def);
	else
		*s = '\0';
	*olds = '\0';
	cursor = strlen(s);
	cursormoved = redraw = true;

	cursorvis = done = false;
	lasttime = TimeCount;
	LastASCII = key_None;
	LastScan = sc_None;

	while (!done)
	{
		if (cursorvis)
			USL_XORICursor(x,y,s,cursor);

	asm	pushf
	asm	cli

		sc = LastScan;
		LastScan = sc_None;
		c = LastASCII;
		LastASCII = key_None;

	asm	popf

		switch (sc)
		{
		case sc_LeftArrow:
			if (cursor)
				cursor--;
			c = key_None;
			cursormoved = true;
			break;
		case sc_RightArrow:
			if (s[cursor])
				cursor++;
			c = key_None;
			cursormoved = true;
			break;
		case sc_Home:
			cursor = 0;
			c = key_None;
			cursormoved = true;
			break;
		case sc_End:
			cursor = strlen(s);
			c = key_None;
			cursormoved = true;
			break;

		case sc_Return:
			strcpy(buf,s);
			done = true;
			result = true;
			c = key_None;
			break;
		case sc_Escape:
			if (escok)
			{
				done = true;
				result = false;
			}
			c = key_None;
			break;

		case sc_BackSpace:
			if (cursor)
			{
				strcpy(s + cursor - 1,s + cursor);
				cursor--;
				redraw = true;
			}
			c = key_None;
			cursormoved = true;
			break;
		case sc_Delete:
			if (s[cursor])
			{
				strcpy(s + cursor,s + cursor + 1);
				redraw = true;
			}
			c = key_None;
			cursormoved = true;
			break;

		case 0x4c:	// Keypad 5
		case sc_UpArrow:
		case sc_DownArrow:
		case sc_PgUp:
		case sc_PgDn:
		case sc_Insert:
			c = key_None;
			break;
		}

		if (c)
		{
			len = strlen(s);
			USL_MeasureString(s,&w,&h);

			if
			(
				isprint(c)
			&&	(len < MaxString - 1)
			&&	((!maxchars) || (len < maxchars))
			&&	((!maxwidth) || (w < maxwidth))
			)
			{
				for (i = len + 1;i > cursor;i--)
					s[i] = s[i - 1];
				s[cursor++] = c;
				redraw = true;
			}
		}

		if (redraw)
		{
			px = x;
			py = y;
			temp = fontcolor;
			fontcolor = backcolor;
			USL_DrawString(olds);
			fontcolor = temp;
			strcpy(olds,s);

			px = x;
			py = y;
			USL_DrawString(s);

			redraw = false;
		}

		if (cursormoved)
		{
			cursorvis = false;
			lasttime = TimeCount - TickBase;

			cursormoved = false;
		}
		if (TimeCount - lasttime > TickBase / 2)
		{
			lasttime = TimeCount;

			cursorvis ^= true;
		}
		if (cursorvis)
			USL_XORICursor(x,y,s,cursor);

		VW_UpdateScreen();
	}

	if (cursorvis)
		USL_XORICursor(x,y,s,cursor);
	if (!result)
	{
		px = x;
		py = y;
		USL_DrawString(olds);
	}
	VW_UpdateScreen();

	IN_ClearKeysDown();
	return(result);
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色欧美乱欧美15图片| 性做久久久久久免费观看| 精品一区二区三区日韩| 日韩欧美久久一区| 国产乱人伦偷精品视频免下载| 26uuu精品一区二区| 国产精品99久久久久久似苏梦涵| 欧美国产精品专区| 91免费国产在线| 亚洲成人先锋电影| 精品国产不卡一区二区三区| 久久国产尿小便嘘嘘尿| 久久久99免费| 一本大道久久精品懂色aⅴ| 亚洲国产欧美在线人成| 91麻豆精品国产91久久久资源速度 | 国产精品一二二区| 欧美韩国一区二区| 在线免费观看不卡av| 色中色一区二区| 亚洲一卡二卡三卡四卡五卡| 777午夜精品免费视频| 国产一区二区三区电影在线观看| 日本一区二区三区国色天香| 91麻豆自制传媒国产之光| 亚洲午夜视频在线| 337p亚洲精品色噜噜噜| 国产一区二区在线观看视频| 亚洲丝袜自拍清纯另类| 欧美肥胖老妇做爰| 国产suv精品一区二区三区| 亚洲日本乱码在线观看| 欧美精品在线观看一区二区| 国产激情一区二区三区| 亚洲网友自拍偷拍| 久久精品人人做人人爽97| 一本一道久久a久久精品| 美国欧美日韩国产在线播放| 中文字幕乱码久久午夜不卡| 欧美精品一二三区| 成人黄色大片在线观看| 日韩不卡在线观看日韩不卡视频| 国产精品沙发午睡系列990531| 日本乱人伦aⅴ精品| 国内精品免费在线观看| 一区二区三区成人| 久久久777精品电影网影网| 欧美优质美女网站| 丰满少妇久久久久久久| 五月天久久比比资源色| 国产精品电影一区二区| 久久综合久久综合久久综合| 欧美日韩一二三| 91亚洲午夜精品久久久久久| 国产成人小视频| 久久97超碰国产精品超碰| 亚洲福利一区二区三区| 1024精品合集| 欧美激情一区三区| 亚洲精品一区二区精华| 欧美精品久久久久久久久老牛影院| 成人爱爱电影网址| 国产99精品国产| 国产伦精一区二区三区| 在线视频欧美区| 99精品视频在线观看| 粉嫩一区二区三区在线看 | 美腿丝袜一区二区三区| 亚洲一区二区三区三| 亚洲天堂久久久久久久| 中文久久乱码一区二区| 国产丝袜欧美中文另类| 日韩美女在线视频| 日韩一区二区三区av| 欧美精品日日鲁夜夜添| 在线观看免费视频综合| 欧美影视一区二区三区| 色菇凉天天综合网| 欧美性感一类影片在线播放| 91久久线看在观草草青青 | 国产麻豆精品在线| 国产毛片精品视频| 粉嫩aⅴ一区二区三区四区| 国产高清精品网站| www.色综合.com| youjizz国产精品| 色综合久久久久久久| 日本伦理一区二区| 欧美天堂一区二区三区| 欧美高清视频在线高清观看mv色露露十八| 欧洲av一区二区嗯嗯嗯啊| 欧美网站一区二区| 在线成人高清不卡| 日韩三级高清在线| 欧美精品一区二| 久久久久久免费| 最新欧美精品一区二区三区| 亚洲特黄一级片| 午夜精品久久一牛影视| 久久99国产精品久久| 懂色一区二区三区免费观看| 91丝袜国产在线播放| 欧美日韩在线观看一区二区| 日韩欧美国产三级电影视频| 久久久噜噜噜久久中文字幕色伊伊 | 国产69精品久久久久777| 岛国av在线一区| 在线视频亚洲一区| 日韩欧美成人一区| 亚洲欧洲日韩综合一区二区| 五月天一区二区三区| 国产一区二区精品久久99| 99久久夜色精品国产网站| 欧美日韩国产综合一区二区| 精品国产乱码久久久久久图片 | 亚洲美女精品一区| 日韩国产欧美视频| 国产乱人伦偷精品视频不卡| 91免费看`日韩一区二区| 欧美一区二区播放| 中文字幕不卡在线观看| 色婷婷综合五月| 制服丝袜亚洲精品中文字幕| 久久精品亚洲精品国产欧美kt∨ | 亚洲国产视频网站| 国内精品国产成人国产三级粉色| 99精品视频一区二区| 日韩亚洲欧美高清| 亚洲手机成人高清视频| 激情五月婷婷综合| 欧美日韩精品三区| 国产精品国产三级国产aⅴ入口| 蜜芽一区二区三区| 91在线看国产| 国产欧美日韩在线观看| 男男成人高潮片免费网站| av在线播放成人| 精品99999| 亚洲成人精品一区二区| 99久久精品99国产精品| 精品美女一区二区| 午夜a成v人精品| 91免费国产在线观看| 国产欧美精品区一区二区三区 | 韩日精品视频一区| 欧美日韩aaaaaa| 中文字幕不卡在线| 国产传媒欧美日韩成人| 日韩网站在线看片你懂的| 一区二区三区精品视频在线| 成人美女视频在线观看| 精品国产一区久久| 日韩二区三区四区| 欧美人牲a欧美精品| 亚洲另类中文字| 97se亚洲国产综合自在线观| 久久你懂得1024| 精东粉嫩av免费一区二区三区| 欧美熟乱第一页| 亚洲欧美国产77777| a级精品国产片在线观看| 国产亚洲欧美色| 国产成人综合视频| 久久久久久久综合| 国产xxx精品视频大全| 国产欧美视频一区二区| 成熟亚洲日本毛茸茸凸凹| 精品国产一区二区国模嫣然| 精久久久久久久久久久| 国产日韩欧美电影| 成人av网站在线观看免费| 亚洲黄色录像片| 在线观看91精品国产入口| 亚洲一区二区三区影院| 欧美在线免费观看亚洲| 亚洲国产成人精品视频| 91精品在线一区二区| 免费的国产精品| 亚洲精品一区二区三区蜜桃下载| 国产一区91精品张津瑜| 中文字幕+乱码+中文字幕一区| 盗摄精品av一区二区三区| 国产精品第五页| 欧美性受xxxx黑人xyx| 婷婷久久综合九色国产成人 | 久久久美女艺术照精彩视频福利播放| 国产自产高清不卡| 国产女人18毛片水真多成人如厕| 成人午夜视频网站| 一区二区高清免费观看影视大全| 欧美午夜精品久久久久久孕妇| 日本最新不卡在线| 久久这里只精品最新地址| 成人晚上爱看视频| 亚洲色大成网站www久久九九| 欧美日韩成人一区| 经典三级一区二区| 亚洲欧美综合色| 欧美日韩精品免费| 国产成人午夜99999|