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

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

?? svgademo.c

?? MSC或BC開發的SVGA圖形開發庫(允許使用300x200,640x480,80x600,1024x768等多種模式) 此開發庫特別適合嵌入式系統
?? C
字號:
/****************************************************************************
	 
	  'SVGACC' A Super Vga Graphics Library for use with Microsoft and
	  Borland C/C++
	  Copyright 1993-1994 by Stephen L. Balkum and Daniel A. Sill

	  GIF and 'Graphics Intechange Format' are trademarks (tm) of
	  Compuserve, Incorporated, an H&R Block Company.

	**************** UNREGISTERD SHAREWARE VERSION ***********************
	* FOR EVUALATION ONLY. NOT FOR RESALE IN ANY FORM. SOFTWARE WRITTEN  *
	* USING THIS UNREGISTERED SHAREWARE GRAPHICS LIBRARY MAY NOT BY SOLD *
	* OR USED FOR ANY PURPOSE OTHER THAN THE EVUALTION OF THIS LIBRARY.  *
	**********************************************************************

	**************** NO WARRANTIES AND NO LIABILITY **********************
	* Stephen L. Balkum and Daniel A. Sill provide no warranties, either *
	* expressed or implied, of merchantability, or fitness, for a        *
	* particular use or purpose of this SOFTWARE and documentation.      *
	* In no event shall Stephen L. Balkum or Daniel A. Sill be held      *
	* liable for any damages resulting from the use or misuse of the     * 
	* SOFTWARE and documentation.                                        *
	**********************************************************************

	************** U.S. GOVERNMENT RESTRICTED RIGHTS *********************
	* Use, duplication, or disclosure of the SOFTWARE and documentation  *
	* by the U.S. Government is subject to the restictions as set forth  *
	* in subparagraph (c)(1)(ii) of the Rights in Technical Data and     *
	* Computer Software cluse at DFARS 252.227-7013.                     *
	* Contractor/manufacturer is Stephen L. Balkum and Daniel A. Sill,   *
	* P.O. Box 7704, Austin, Texas 78713-7704                            *
	**********************************************************************

	**********************************************************************
	* By using this SOFTWARE or documentation, you agree to the above    *
	* terms and conditions.                                              *
	**********************************************************************

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

#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <dos.h>

#include "svgacc.h"

#include "svgademo.h"


void main(void) {

	int startvideomode;
	int i, max, ky;
	int mjv, mnv, tp;
	int cpu, videomemory;
	int mouse, joystick;
	int res;
	int offset, colr;
	float mypi;
	char dummy;
	char buf[TITLEN];
	char *dumptr;
	
	
	/*
	 * Save the starting videomode and set it to mode 3.
	 */
	startvideomode = videomodeget();
	restext();
	screenclear();
	
	/*
	 * Move the DOS cursor to the top left to start the program and say hello
	 */
	screengoto(11,0);
	printf("/*SVGACC.LIB/* A SuperVGA Graphics Library for use with\n");
	screengoto(23,1);
	printf("Microsoft and Borland C/C++\n");
	screengoto(9,2);
	printf("Copyright 1993-1994 by Stephen L. Balkum and Daniel A. Sill\n");
	screengoto(23,11);
	printf("Demonstration/Example Program\n");
	screengoto(0,22);
	printf("press a key to begin the demo...\n");
	getkey();

	screenclear();
   
	/*
	 * Let's id the processor first as the library requires a 386 or better.
	 */
	screengoto(0,0);
	cpu = whichcpu();
	if (cpu < 386) {
		printf("Sorry, this library requires an 80386 or better processor.\n");
		printf("Processor is identified as an 80%d.\n", cpu);
		printf("Demo program will be terminated.\n\n");
		printf("press a key...\n");
		getkey();
		videomodeset(startvideomode);
		exit(0);
	}


	/*
	 * Let's id the video card/chip as the library requires a SuperVGA adapter.
	 */
	switch(whichvga()) {
		case ACUMOS:
			sprintf(buf,"Acumos AVGA2/3 SuperVGA");
			break;
		case ATI:
			sprintf(buf,"ATI Technologies 18/28/38/68800 SuperVGA");
			break;
		case AHEADA:
			sprintf(buf,"Ahead V5000 Ver A SuperVGA");
			break;
		case AHEADB:
			sprintf(buf,"Ahead V5000 Ver B SuperVGA");
			break;
		case CHIPSTECH:
			sprintf(buf,"Chips and Technologies 82C450/1/2/3/5/6/7 SuperVGA");
			break;
		case CIRRUS:
			sprintf(buf,"Cirrus Logic CL-GD 5xx,6xx,28xx,54xx,62xx SuperVGA");
			break;
		case EVEREX:
			sprintf(buf,"Everex EV236/6xx Micro Enhancer SuperVGA");
			break;
		case GENOA:
			sprintf(buf,"Genoa 61/62/63/64/6600 SuperVGA");
			break;
		case NCR:
			sprintf(buf,"NCR 77C21/22/22E/22E+ SuperVGA");
			break;
		case OAKTECH:
			sprintf(buf,"Oak Technologies OTI-037/67/77/87C SuperVGA");
			break;
		case PARADISE:
			sprintf(buf,"Paradise/Western Digital PVGA1A,WD90C00/1x/2x/3x SuperVGA");
			break;
		case REALTEK:
			sprintf(buf,"Realtek RT3106 SuperVGA");
			break;
		case TRIDENT:
			sprintf(buf,"Trident 8800CS,8900B/C/CL/CX,90x0 SuperVGA");
			break;
		case TSENG3:
			sprintf(buf,"Tseng Labs ET3000-AX/BX/BP SuperVGA");
			break;
		case TSENG4:
			sprintf(buf,"Tseng Labs ET4000/W32/W32I SuperVGA");
			break;
		case VESA:
			sprintf(buf,"VESA compatible SuperVGA");
			break;
		case VIDEO7:
			sprintf(buf,"Video 7 HT-208/16 SuperVGA");
			break;
		case AVANCE:
			sprintf(buf,"Avance Logic AL2101 SuperVGA");
			break;
		case MXIC:
			sprintf(buf,"MXIC MX68000/10 SuperVGA");
			break;
		case PRIMUS:
			sprintf(buf,"Primus P2000 SuperVGA");
			break;
		default:
			printf("Microprocessor is identified as an 80%d.\n", cpu);
			printf("Sorry, unable to identify video card or it is not a SuperVGA video adapter.\n");
			printf("Demo program will be terminated.\n\n");
			printf("press a key...\n");
			getkey();
			videomodeset(startvideomode);
			exit(0);
	}
	printf("Microprocessor is identified as an 80%d.\n", cpu);
	
	fontsystem();
	printf("Video card/chip is identified as %s.\n",&buf);
   
	/*
	 * Let's see the how much memory is installed on the super vga adapter.
	 */
	videomemory = whichmem();
	if (videomemory < 1) {
		printf("Sorry, unable to identify the amount of installed video memory.\n");
		printf("Demo program will be terminated.\n\n");
		printf("press a key...\n");
		getkey();
		videomodeset(startvideomode);
		exit(0);
	} else
		printf("Installed video memory identified as %dkb.\n", videomemory);
	   
	/*
	 * Let's tell the user what the highest resolution that the video card
	 * and its installed memory card is capable of. The monitor must be able
	 * to support those modes too !
	 */
	printf("Video card and installed memory is capable of the following resolutions:\n");
	if (videomemory > 1023) {
		printf("    320x200 in 256 colors\n");
		printf("    640x400 in 256 colors\n");
		printf("    640x480 in 256 colors\n");
		printf("    800x600 in 256 colors\n");
		printf("    1024x768 in 256 colors\n");
		max = 4;
	} else if (videomemory > 511) {
		printf("    320x200 in 256 colors\n");
		printf("    640x400 in 256 colors\n");
		printf("    640x480 in 256 colors\n");
		printf("    800x600 in 256 colors\n");
		max = 3;
	} else {
		printf("    320x200 in 256 colors\n");
		printf("    640x400 in 256 colors\n");
		max = 1;
	}
	printf("\nPlease keep in mind that not all monitors support all resolutions.\n\n");

	/*
	 * Let's look for a mouse. if we find one, tell all about it
	 */
	mouse = whichmouse();
	if (mouse > 0) {
		mouseinfo(&mjv, &mnv, &tp, &i);
		switch (tp) {
			case 1:
				sprintf(buf,"bus mouse");
				break;
			case 2:
				sprintf(buf,"serial mouse");
				break;
			case 3:
				sprintf(buf,"Inport mouse");
				break;
			case 4:
				sprintf(buf,"PS/2 mouuse");
				break;
			case 5:
				sprintf(buf,"HP mouse");
				break;
			default:
				sprintf(buf,"unknown type");
		}
		printf("Microsoft compatible %s detected with %d buttons on IRQ %d.\n", &buf, mouse, i);
		printf("Software driver version is %d.%d (Microsoft equivalent version).\n\n", mjv, mnv);

	} else
		printf("No Microsoft compatible mouse detected.\n\n");

	/*
	 * Let's look for joysticks
	 */
	joystick = whichjoystick();
	switch (joystick) {
		case -1:
			printf("No joystick port detected or no joystick BIOS support present.\n\n");
			break;
		case 0:
			printf("No joystick detected\n\n");
			break;
		case 1:
			printf("Joystick A is present and available.\n\n");
			break;
		case 2:
			printf("Joystick B is present and available.\n\n");
			break;
		case 3:
			printf("Both Joystick A and Joystick B are present and available.\n\n");
			break;
	}
	printf("press a key...\n");
	getkey();


	/*
	 * Let's get down to business
	 */
	res = 1;
	endit = 0;
	ky=0;
	
	/*
	 * Init alternate color palettes
	 */

	res320();
	palget(orgpal, 0, 255);
	palcopy(orgpal,pal,0,255);
	palcopy(orgpal,pal2,0,255);
	mypi=(float)(8 * atan(1) / 240);
	offset = 16;
	for (colr=0;colr<240;colr++,offset++) {
		pal[offset].r = (char)(32.0 + sin((colr + 0) * mypi) * 31.0);
		pal[offset].g = (char)(32.0 + sin((colr + 80) * mypi) * 31.0);
		pal[offset].b = (char)(32.0 + sin((colr + 160) * mypi) * 31.0);
		pal2[offset].r = (char)(32.0 + sin((colr + 10) * mypi) * 31.0);
		pal2[offset].g = (char)(32.0 + sin((colr + 30) * mypi) * 31.0);
		pal2[offset].b = (char)(32.0 + sin((colr + 50) * mypi) * 31.0);
	}
	restext();

	/*
	 * Here is the main selector loop
	 */
	while (endit == 0) {
		screenclear();
		switch (res) {
			case 1: 
				sprintf(buf,"320x200x256");
				break;
			case 2:
				sprintf(buf,"640x400x256");
				break;
			case 3:
				sprintf(buf,"640x480x256");
				break;
			case 4:
				sprintf(buf,"800x600x256");
				break;
			case 5:
				sprintf(buf,"1024x768x256");
		}
		printf("Please select the demo you would like to see in the %s resolution:\n\n",&buf);
		printf("(0)  Exit This Program\n\n");
		printf("(1)  Demo #1  The Primitive Drawing Routines\n");
		printf("(2)  Demo #2  The Clipping Capabilities\n");
		printf("(3)  Demo #3  The Fill Routines\n");
		printf("(4)  Demo #4  The Palette Routines\n");
		printf("(5)  Demo #5  The Block Routines\n");
		printf("(6)  Demo #6  The Text Routines\n");
		printf("(7)  Demo #7  The Scrolling Routines\n");
		printf("(8)  Demo #8  The GIF (tm) Routines\n");
		printf("(9)  Demo #9  The Mouse Routines\n");
		printf("(10) Demo #10 The Joystick Routines\n");
		printf("(11) Demo #11 The Two Dimensional Routines\n");
		printf("(12) Demo #12 The Three Dimensional Routines\n");
		printf("(13) The Grand Tour of All Demos\n\n");
		printf("(14) Use 320x200 in 256 colors\n");
		printf("(15) Use 640x400 in 256 colors\n");
		max = 14;
		if (videomemory > 511) {
			printf("(16) Use 640x480 in 256 colors\n");
			printf("(17) Use 800x600 in 256 colors\n");
			max = 17;
		} 
		if (videomemory > 1023) {
			printf("(18) Use 1024x768 in 256 colors\n");
			max = 18;
		}
		
		printf("\nYour Choice: ");
		for (i=0;i<3;i++) {
			dummy = (char)getch();
			switch (dummy) {
				case 13:
					if (i == 0)
						i--;
					else {
						buf[i]='\0';
						i=2;
					}
					break;
				case 8:
					i--;
					if (i > (-1)) {
						printf("\b \b");
						i--;
					}
					break;
				default:
					if ((dummy < '0') || (dummy > '9'))
						i--;
					else if (i < 2) {
						printf("%c",dummy);
						buf[i] = dummy;
					} else
						buf[i] = '\0';

			}
		}
		ky=(int)strtol(buf,&dumptr,10);

		if (ky > max)
			ky = 99;
	
		if((ky > 0) && (ky < 14))
			switch (res) {
				case 1:
					res320();
					break;
				case 2:
					res640l();
					break;
				case 3:
					res640();
					break;
				case 4:
					res800();
					break;
				case 5:
					res1024();
					break;
			}
		
		switch (ky) {
			case 0:
				endit = 1;
				break;
			case 1:
				doprims();
				break;
			case 2:
				doclip();
				break;
			case 3:
				dofill();
				break;
			case 4:
				dopal();
				break;
			case 5:
				doblock();
				break;
			case 6:
				dotext();
				break;
			case 7:
				doscroll();
				break;
			case 8:
				dogif();
				break;
			case 9:
				domouse();
				break;
			case 10:
				dojoystick();
				break;
			case 11:
				do2d();
				break;
			case 12:
				do3d();
				break;
			case 13:
				doall();
				break;
			case 14:
				res = 1;
				break;
			case 15:
				res = 2;
				break;
			case 16:
				res = 3;
				break;
			case 17:
				res = 4;
				break;
			case 18:
				res = 5;
				break;
			default:
				;

		}
		
		restext();
		
	}

	videomodeset(startvideomode);

}

/**********               
 * GETKEY *
 **********/

char getkey(void)
{
	char ret;
	beep();
	ret = (char)getch();
	if ( (ret == 'Q') || (ret == 'q') )
		endit = 1;
	if (ret == 'Q')
		ret = 'q';
	if (ret == 'S')
		ret = 's';
	
	return(ret);
}


/*********
 * DOALL *
 *********/

void doall(void)
{
	if(doprims()=='q')
		return;
	if(doclip()=='q')
		return;
	if(dofill()=='q')
		return;
	if(dopal()=='q')
		return;
	if(doblock()=='q')
		return;
	if(dotext()=='q')
		return;
	if(doscroll()=='q')
		return;
	if(dogif()=='q')
		return;
	if(domouse()=='q')
		return;
	if(dojoystick()=='q')
		return;
	if(do2d()=='q')
		return;
	if(do3d()=='q')
		return;

	return;

}


/***************
 * SCREENCLEAR *
 ***************/

void screenclear(void)
{
	union REGS regs;

	regs.h.ah = 0x07;
	regs.h.al = 0x00;
	regs.h.ch = 0;
	regs.h.cl = 0;
	regs.h.dh = 24;
	regs.h.dl = 79;
	regs.h.bh = 7;
	int86(0x10, &regs, &regs);
	screengoto(1,1);
}


/**************
 * SCREENGOTO *
 **************/

void screengoto(int x, int y)
{
	union REGS regs;

	regs.h.ah = 0x02;
	regs.h.bh = 0;
	regs.h.dh = (unsigned char)y;
	regs.h.dl = (unsigned char)x;
	int86(0x10, &regs, &regs);
}

/********
 * BEEP *
 ********/

void beep(void)
{

	int cont;

	outp(0x43,0xB6);
	outp(0x42,0xA9);
	outp(0x42,0x06);
	cont = inp(0x61);
	outp(0x61,cont | 0x03);
	sdelay(4);
	outp(0x61,cont);

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
www.99精品| 日韩成人午夜电影| 国产精品久久久久久久午夜片| 在线成人午夜影院| 欧美tk—视频vk| 亚洲人亚洲人成电影网站色| 亚洲自拍另类综合| 美女脱光内衣内裤视频久久网站| 毛片一区二区三区| 色老头久久综合| 日韩欧美一级精品久久| 成人免费在线播放视频| 视频一区二区国产| 97精品视频在线观看自产线路二| 欧美中文字幕一区二区三区亚洲| 欧美一级一级性生活免费录像| 中文一区一区三区高中清不卡| 亚洲成人免费在线| 91视频在线观看| 国产目拍亚洲精品99久久精品| 午夜精品久久久| 麻豆成人免费电影| 欧美日韩高清影院| 一区二区三区在线视频免费观看| 激情文学综合网| 日韩欧美激情在线| 天天综合天天综合色| 丁香六月久久综合狠狠色| 欧美一区二区三区色| 亚洲一区二区三区四区在线观看 | 欧美一区二区三区爱爱| 亚洲一区二区高清| 欧美日韩一级二级| 亚洲一区二区精品视频| 日本乱人伦一区| 亚洲一区在线看| 在线播放日韩导航| 精品一区二区三区不卡| 日韩写真欧美这视频| 日韩电影一二三区| www久久精品| 成人黄色av网站在线| 亚洲人亚洲人成电影网站色| 欧洲亚洲精品在线| 精品一区二区影视| 国产精品素人视频| 欧美日韩aaa| 国产精品77777| 一区二区欧美视频| www国产成人| 日本精品视频一区二区三区| 奇米777欧美一区二区| 久久看人人爽人人| 91麻豆精品91久久久久久清纯| 久久99国产乱子伦精品免费| 亚洲女子a中天字幕| 日韩欧美一区电影| 欧美巨大另类极品videosbest | 欧美性猛交一区二区三区精品| 亚洲国产精品影院| 国产精品国产三级国产| 精品日韩在线观看| 欧美性受xxxx黑人xyx| 国产99一区视频免费| 丝袜美腿高跟呻吟高潮一区| 亚洲精品乱码久久久久久日本蜜臀 | 日本va欧美va精品| 五月婷婷另类国产| 亚洲综合无码一区二区| 亚洲人成网站精品片在线观看| 欧美精品一区二区三区蜜桃视频 | 91精品久久久久久蜜臀| 欧美少妇一区二区| 在线观看91av| 精品国产91洋老外米糕| 久久嫩草精品久久久精品| 在线播放中文一区| 精品国产a毛片| 国产精品久久福利| 亚洲高清在线视频| 青青草成人在线观看| 蜜臀久久久久久久| 狠狠色综合色综合网络| 国产丶欧美丶日本不卡视频| 国产精品亚洲第一区在线暖暖韩国| 国产精品亚洲一区二区三区妖精| 国产一区二区在线看| 成人福利视频网站| 日韩欧美国产三级| 亚洲视频在线一区二区| 七七婷婷婷婷精品国产| 91小视频在线免费看| 91精品综合久久久久久| 日韩理论片在线| 国产精品综合一区二区三区| 欧美伊人精品成人久久综合97| 日韩久久免费av| 日韩精品亚洲一区二区三区免费| 国产综合色产在线精品| 欧美日韩精品专区| 亚洲欧美激情小说另类| 国产乱码精品一区二区三区忘忧草 | 中文字幕一区二区三区四区不卡 | 日韩一区二区在线观看| 亚洲一区影音先锋| 欧美在线视频不卡| 亚洲激情av在线| 欧美综合亚洲图片综合区| 亚洲欧美一区二区在线观看| 国产在线观看一区二区| 精品国产精品网麻豆系列| 免费成人性网站| 欧美一区二区三区系列电影| 麻豆91精品91久久久的内涵| 在线91免费看| 韩国毛片一区二区三区| 欧美精品一区二区三区在线| 国产一区福利在线| 国产精品无人区| 欧美视频完全免费看| 视频精品一区二区| 国产天堂亚洲国产碰碰| 91日韩一区二区三区| 午夜不卡av在线| 国产区在线观看成人精品| 欧美性做爰猛烈叫床潮| 久久99精品国产麻豆婷婷| 国产精品久久久久久妇女6080| 91玉足脚交白嫩脚丫在线播放| 亚洲免费观看高清完整 | 毛片基地黄久久久久久天堂| 国产精品五月天| 精品精品国产高清a毛片牛牛| 99久久精品国产导航| 国内偷窥港台综合视频在线播放| 亚洲视频在线一区观看| 欧美一级淫片007| 国产69精品一区二区亚洲孕妇| 欧美激情资源网| 欧美日韩一级片在线观看| 国产麻豆欧美日韩一区| 亚洲精品在线免费观看视频| 99久久伊人精品| 精品亚洲成a人| 石原莉奈一区二区三区在线观看| 2023国产精品自拍| 51精品国自产在线| 欧美伊人久久久久久久久影院 | 色婷婷亚洲一区二区三区| 亚洲女同一区二区| 中文字幕乱码久久午夜不卡| 欧美不卡视频一区| 欧美一级电影网站| 91首页免费视频| 成人一区在线观看| 成人午夜激情视频| 国产精品88av| 成人18视频日本| caoporen国产精品视频| 成人美女视频在线观看18| 九九九久久久精品| 九九九久久久精品| 蜜臀av国产精品久久久久| 蜜臀精品一区二区三区在线观看 | 最新国产成人在线观看| 国产亚洲精品久| 国产女人水真多18毛片18精品视频 | 一个色在线综合| 蜜桃一区二区三区在线观看| 精品一区二区在线播放| 成人小视频在线观看| 91麻豆国产福利在线观看| 5566中文字幕一区二区电影| 91极品视觉盛宴| 欧美一二三四在线| 国产精品天干天干在线综合| 一区二区三区**美女毛片| 亚洲一区二区不卡免费| 久色婷婷小香蕉久久| 色综合天天综合网天天狠天天| 欧美一区二区精品久久911| 2021国产精品久久精品| 亚洲尤物视频在线| 国产91对白在线观看九色| 欧美图片一区二区三区| 色综合天天综合网国产成人综合天| 欧美唯美清纯偷拍| 国产精品久久久爽爽爽麻豆色哟哟 | 91网站最新地址| 国产精品久久久久久久蜜臀| 日本亚洲电影天堂| 欧美亚洲另类激情小说| 一区二区三区四区在线| av午夜一区麻豆| 国产欧美一区二区精品秋霞影院 | 国产精品免费久久久久| 久久精品国产亚洲a| 日韩免费一区二区| 美女视频第一区二区三区免费观看网站| 国产精选一区二区三区|