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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? cl_cin.c

?? quakeIII源碼這個(gè)不用我多說吧
?? C
?? 第 1 頁 / 共 4 頁
字號:
//
// 1/4 screen
//
		if (cinTable[currentHandle].samplesPerPixel==2) {
			for(i=0;i<two;i++) {
				y0 = (long)*input; input+=2;
				y2 = (long)*input; input+=2;
				cr = (long)*input++;
				cb = (long)*input++;
				*bptr++ = yuv_to_rgb( y0, cr, cb );
				*bptr++ = yuv_to_rgb( y2, cr, cb );
			}

			cptr = (unsigned short *)vq4;
			dptr = (unsigned short *)vq8;
	
			for(i=0;i<four;i++) {
				aptr = (unsigned short *)vq2 + (*input++)*2;
				bptr = (unsigned short *)vq2 + (*input++)*2;
				for(j=0;j<2;j++) { 
					VQ2TO2(aptr,bptr,cptr,dptr);
				}
			}
		} else if (cinTable[currentHandle].samplesPerPixel == 1) {
			bbptr = (byte *)bptr;
				
			for(i=0;i<two;i++) {
				*bbptr++ = cinTable[currentHandle].gray[*input]; input+=2;
				*bbptr++ = cinTable[currentHandle].gray[*input]; input+=4;
			}

			bcptr = (byte *)vq4;
			bdptr = (byte *)vq8;
	
			for(i=0;i<four;i++) {
				baptr = (byte *)vq2 + (*input++)*2;
				bbptr = (byte *)vq2 + (*input++)*2;
				for(j=0;j<2;j++) { 
					VQ2TO2(baptr,bbptr,bcptr,bdptr);
				}
			}			
		} else if (cinTable[currentHandle].samplesPerPixel == 4) {
			ibptr = (unsigned int *) bptr;
			for(i=0;i<two;i++) {
				y0 = (long)*input; input+=2;
				y2 = (long)*input; input+=2;
				cr = (long)*input++;
				cb = (long)*input++;
				*ibptr++ = yuv_to_rgb24( y0, cr, cb );
				*ibptr++ = yuv_to_rgb24( y2, cr, cb );
			}

			icptr = (unsigned int *)vq4;
			idptr = (unsigned int *)vq8;
	
			for(i=0;i<four;i++) {
				iaptr = (unsigned int *)vq2 + (*input++)*2;
				ibptr = (unsigned int *)vq2 + (*input++)*2;
				for(j=0;j<2;j++) { 
					VQ2TO2(iaptr,ibptr,icptr,idptr);
				}
			}
		}
	}
}

/******************************************************************************
*
* Function:		
*
* Description:	
*
******************************************************************************/

static void recurseQuad( long startX, long startY, long quadSize, long xOff, long yOff )
{
	byte *scroff;
	long bigx, bigy, lowx, lowy, useY;
	long offset;

	offset = cinTable[currentHandle].screenDelta;
	
	lowx = lowy = 0;
	bigx = cinTable[currentHandle].xsize;
	bigy = cinTable[currentHandle].ysize;

	if (bigx > cinTable[currentHandle].CIN_WIDTH) bigx = cinTable[currentHandle].CIN_WIDTH;
	if (bigy > cinTable[currentHandle].CIN_HEIGHT) bigy = cinTable[currentHandle].CIN_HEIGHT;

	if ( (startX >= lowx) && (startX+quadSize) <= (bigx) && (startY+quadSize) <= (bigy) && (startY >= lowy) && quadSize <= MAXSIZE) {
		useY = startY;
		scroff = cin.linbuf + (useY+((cinTable[currentHandle].CIN_HEIGHT-bigy)>>1)+yOff)*(cinTable[currentHandle].samplesPerLine) + (((startX+xOff))*cinTable[currentHandle].samplesPerPixel);

		cin.qStatus[0][cinTable[currentHandle].onQuad  ] = scroff;
		cin.qStatus[1][cinTable[currentHandle].onQuad++] = scroff+offset;
	}

	if ( quadSize != MINSIZE ) {
		quadSize >>= 1;
		recurseQuad( startX,		  startY		  , quadSize, xOff, yOff );
		recurseQuad( startX+quadSize, startY		  , quadSize, xOff, yOff );
		recurseQuad( startX,		  startY+quadSize , quadSize, xOff, yOff );
		recurseQuad( startX+quadSize, startY+quadSize , quadSize, xOff, yOff );
	}
}


/******************************************************************************
*
* Function:		
*
* Description:	
*
******************************************************************************/

static void setupQuad( long xOff, long yOff )
{
	long numQuadCels, i,x,y;
	byte *temp;

	if (xOff == cin.oldXOff && yOff == cin.oldYOff && cinTable[currentHandle].ysize == cin.oldysize && cinTable[currentHandle].xsize == cin.oldxsize) {
		return;
	}

	cin.oldXOff = xOff;
	cin.oldYOff = yOff;
	cin.oldysize = cinTable[currentHandle].ysize;
	cin.oldxsize = cinTable[currentHandle].xsize;

	numQuadCels  = (cinTable[currentHandle].CIN_WIDTH*cinTable[currentHandle].CIN_HEIGHT) / (16);
	numQuadCels += numQuadCels/4 + numQuadCels/16;
	numQuadCels += 64;							  // for overflow

	numQuadCels  = (cinTable[currentHandle].xsize*cinTable[currentHandle].ysize) / (16);
	numQuadCels += numQuadCels/4;
	numQuadCels += 64;							  // for overflow

	cinTable[currentHandle].onQuad = 0;

	for(y=0;y<(long)cinTable[currentHandle].ysize;y+=16) 
		for(x=0;x<(long)cinTable[currentHandle].xsize;x+=16) 
			recurseQuad( x, y, 16, xOff, yOff );

	temp = NULL;

	for(i=(numQuadCels-64);i<numQuadCels;i++) {
		cin.qStatus[0][i] = temp;			  // eoq
		cin.qStatus[1][i] = temp;			  // eoq
	}
}

/******************************************************************************
*
* Function:		
*
* Description:	
*
******************************************************************************/

static void readQuadInfo( byte *qData )
{
	if (currentHandle < 0) return;

	cinTable[currentHandle].xsize    = qData[0]+qData[1]*256;
	cinTable[currentHandle].ysize    = qData[2]+qData[3]*256;
	cinTable[currentHandle].maxsize  = qData[4]+qData[5]*256;
	cinTable[currentHandle].minsize  = qData[6]+qData[7]*256;
	
	cinTable[currentHandle].CIN_HEIGHT = cinTable[currentHandle].ysize;
	cinTable[currentHandle].CIN_WIDTH  = cinTable[currentHandle].xsize;

	cinTable[currentHandle].samplesPerLine = cinTable[currentHandle].CIN_WIDTH*cinTable[currentHandle].samplesPerPixel;
	cinTable[currentHandle].screenDelta = cinTable[currentHandle].CIN_HEIGHT*cinTable[currentHandle].samplesPerLine;

	cinTable[currentHandle].half = qfalse;
	cinTable[currentHandle].smootheddouble = qfalse;
	
	cinTable[currentHandle].VQ0 = cinTable[currentHandle].VQNormal;
	cinTable[currentHandle].VQ1 = cinTable[currentHandle].VQBuffer;

	cinTable[currentHandle].t[0] = (0 - (unsigned int)cin.linbuf)+(unsigned int)cin.linbuf+cinTable[currentHandle].screenDelta;
	cinTable[currentHandle].t[1] = (0 - ((unsigned int)cin.linbuf + cinTable[currentHandle].screenDelta))+(unsigned int)cin.linbuf;

        cinTable[currentHandle].drawX = cinTable[currentHandle].CIN_WIDTH;
        cinTable[currentHandle].drawY = cinTable[currentHandle].CIN_HEIGHT;
        
	// rage pro is very slow at 512 wide textures, voodoo can't do it at all
	if ( glConfig.hardwareType == GLHW_RAGEPRO || glConfig.maxTextureSize <= 256) {
                if (cinTable[currentHandle].drawX>256) {
                        cinTable[currentHandle].drawX = 256;
                }
                if (cinTable[currentHandle].drawY>256) {
                        cinTable[currentHandle].drawY = 256;
                }
		if (cinTable[currentHandle].CIN_WIDTH != 256 || cinTable[currentHandle].CIN_HEIGHT != 256) {
			Com_Printf("HACK: approxmimating cinematic for Rage Pro or Voodoo\n");
		}
	}
#if defined(MACOS_X)
	cinTable[currentHandle].drawX = 256;
	cinTable[currentHandle].drawX = 256;
#endif
}

/******************************************************************************
*
* Function:		
*
* Description:	
*
******************************************************************************/

static void RoQPrepMcomp( long xoff, long yoff ) 
{
	long i, j, x, y, temp, temp2;

	i=cinTable[currentHandle].samplesPerLine; j=cinTable[currentHandle].samplesPerPixel;
	if ( cinTable[currentHandle].xsize == (cinTable[currentHandle].ysize*4) && !cinTable[currentHandle].half ) { j = j+j; i = i+i; }
	
	for(y=0;y<16;y++) {
		temp2 = (y+yoff-8)*i;
		for(x=0;x<16;x++) {
			temp = (x+xoff-8)*j;
			cin.mcomp[(x*16)+y] = cinTable[currentHandle].normalBuffer0-(temp2+temp);
		}
	}
}

/******************************************************************************
*
* Function:		
*
* Description:	
*
******************************************************************************/

static void initRoQ() 
{
	if (currentHandle < 0) return;

	cinTable[currentHandle].VQNormal = (void (*)(byte *, void *))blitVQQuad32fs;
	cinTable[currentHandle].VQBuffer = (void (*)(byte *, void *))blitVQQuad32fs;
	cinTable[currentHandle].samplesPerPixel = 4;
	ROQ_GenYUVTables();
	RllSetupTable();
}

/******************************************************************************
*
* Function:		
*
* Description:	
*
******************************************************************************/
/*
static byte* RoQFetchInterlaced( byte *source ) {
	int x, *src, *dst;

	if (currentHandle < 0) return NULL;

	src = (int *)source;
	dst = (int *)cinTable[currentHandle].buf2;

	for(x=0;x<256*256;x++) {
		*dst = *src;
		dst++; src += 2;
	}
	return cinTable[currentHandle].buf2;
}
*/
static void RoQReset() {
	
	if (currentHandle < 0) return;

	Sys_EndStreamedFile(cinTable[currentHandle].iFile);
	FS_FCloseFile( cinTable[currentHandle].iFile );
	FS_FOpenFileRead (cinTable[currentHandle].fileName, &cinTable[currentHandle].iFile, qtrue);
	// let the background thread start reading ahead
	Sys_BeginStreamedFile( cinTable[currentHandle].iFile, 0x10000 );
	Sys_StreamedRead (cin.file, 16, 1, cinTable[currentHandle].iFile);
	RoQ_init();
	cinTable[currentHandle].status = FMV_LOOPED;
}

/******************************************************************************
*
* Function:		
*
* Description:	
*
******************************************************************************/

static void RoQInterrupt(void)
{
	byte				*framedata;
        short		sbuf[32768];
        int		ssize;
        
	if (currentHandle < 0) return;

	Sys_StreamedRead( cin.file, cinTable[currentHandle].RoQFrameSize+8, 1, cinTable[currentHandle].iFile );
	if ( cinTable[currentHandle].RoQPlayed >= cinTable[currentHandle].ROQSize ) { 
		if (cinTable[currentHandle].holdAtEnd==qfalse) {
			if (cinTable[currentHandle].looping) {
				RoQReset();
			} else {
				cinTable[currentHandle].status = FMV_EOF;
			}
		} else {
			cinTable[currentHandle].status = FMV_IDLE;
		}
		return; 
	}

	framedata = cin.file;
//
// new frame is ready
//
redump:
	switch(cinTable[currentHandle].roq_id) 
	{
		case	ROQ_QUAD_VQ:
			if ((cinTable[currentHandle].numQuads&1)) {
				cinTable[currentHandle].normalBuffer0 = cinTable[currentHandle].t[1];
				RoQPrepMcomp( cinTable[currentHandle].roqF0, cinTable[currentHandle].roqF1 );
				cinTable[currentHandle].VQ1( (byte *)cin.qStatus[1], framedata);
				cinTable[currentHandle].buf = 	cin.linbuf + cinTable[currentHandle].screenDelta;
			} else {
				cinTable[currentHandle].normalBuffer0 = cinTable[currentHandle].t[0];
				RoQPrepMcomp( cinTable[currentHandle].roqF0, cinTable[currentHandle].roqF1 );
				cinTable[currentHandle].VQ0( (byte *)cin.qStatus[0], framedata );
				cinTable[currentHandle].buf = 	cin.linbuf;
			}
			if (cinTable[currentHandle].numQuads == 0) {		// first frame
				Com_Memcpy(cin.linbuf+cinTable[currentHandle].screenDelta, cin.linbuf, cinTable[currentHandle].samplesPerLine*cinTable[currentHandle].ysize);
			}
			cinTable[currentHandle].numQuads++;
			cinTable[currentHandle].dirty = qtrue;
			break;
		case	ROQ_CODEBOOK:
			decodeCodeBook( framedata, (unsigned short)cinTable[currentHandle].roq_flags );
			break;
		case	ZA_SOUND_MONO:
			if (!cinTable[currentHandle].silent) {
				ssize = RllDecodeMonoToStereo( framedata, sbuf, cinTable[currentHandle].RoQFrameSize, 0, (unsigned short)cinTable[currentHandle].roq_flags);
                                S_RawSamples( ssize, 22050, 2, 1, (byte *)sbuf, 1.0f );
			}
			break;
		case	ZA_SOUND_STEREO:
			if (!cinTable[currentHandle].silent) {
				if (cinTable[currentHandle].numQuads == -1) {
					S_Update();
					s_rawend = s_soundtime;
				}
				ssize = RllDecodeStereoToStereo( framedata, sbuf, cinTable[currentHandle].RoQFrameSize, 0, (unsigned short)cinTable[currentHandle].roq_flags);
                                S_RawSamples( ssize, 22050, 2, 2, (byte *)sbuf, 1.0f );
			}
			break;
		case	ROQ_QUAD_INFO:
			if (cinTable[currentHandle].numQuads == -1) {
				readQuadInfo( framedata );
				setupQuad( 0, 0 );
				// we need to use CL_ScaledMilliseconds because of the smp mode calls from the renderer
				cinTable[currentHandle].startTime = cinTable[currentHandle].lastTime = CL_ScaledMilliseconds()*com_timescale->value;
			}
			if (cinTable[currentHandle].numQuads != 1) cinTable[currentHandle].numQuads = 0;
			break;
		case	ROQ_PACKET:
			cinTable[currentHandle].inMemory = cinTable[currentHandle].roq_flags;
			cinTable[currentHandle].RoQFrameSize = 0;           // for header
			break;
		case	ROQ_QUAD_HANG:
			cinTable[currentHandle].RoQFrameSize = 0;
			break;
		case	ROQ_QUAD_JPEG:
			break;
		default:
			cinTable[currentHandle].status = FMV_EOF;
			break;
	}	
//
// read in next frame data
//
	if ( cinTable[currentHandle].RoQPlayed >= cinTable[currentHandle].ROQSize ) { 
		if (cinTable[currentHandle].holdAtEnd==qfalse) {
			if (cinTable[currentHandle].looping) {
				RoQReset();
			} else {
				cinTable[currentHandle].status = FMV_EOF;
			}
		} else {
			cinTable[currentHandle].status = FMV_IDLE;
		}
		return; 
	}
	
	framedata		 += cinTable[currentHandle].RoQFrameSize;
	cinTable[currentHandle].roq_id		 = framedata[0] + framedata[1]*256;
	cinTable[currentHandle].RoQFrameSize = framedata[2] + framedata[3]*256 + framedata[4]*65536;
	cinTable[currentHandle].roq_flags	 = framedata[6] + framedata[7]*256;
	cinTable[currentHandle].roqF0		 = (char)framedata[7];
	cinTable[currentHandle].roqF1		 = (char)framedata[6];

	if (cinTable[currentHandle].RoQFrameSize>65536||cinTable[currentHandle].roq_id==0x1084) {
		Com_DPrintf("roq_size>65536||roq_id==0x1084\n");
		cinTable[currentHandle].status = FMV_EOF;
		if (cinTable[currentHandle].looping) {
			RoQReset();
		}
		return;
	}
	if (cinTable[currentHandle].inMemory && (cinTable[currentHandle].status != FMV_EOF)) { cinTable[currentHandle].inMemory--; framedata += 8; goto redump; }
//
// one more frame hits the dust
//
//	assert(cinTable[currentHandle].RoQFrameSize <= 65536);
//	r = Sys_StreamedRead( cin.file, cinTable[currentHandle].RoQFrameSize+8, 1, cinTable[currentHandle].iFile );
	cinTable[currentHandle].RoQPlayed	+= cinTable[currentHandle].RoQFrameSize+8;
}

/******************************************************************************
*
* Function:		
*
* Description:	
*
******************************************************************************/

static void RoQ_init( void )
{
	// we need to use CL_ScaledMilliseconds because of the smp mode calls from the renderer
	cinTable[currentHandle].startTime = cinTable[currentHandle].lastTime = CL_ScaledMilliseconds()*com_timescale->value;

	cinTable[currentHandle].RoQPlayed = 24;

/*	get frame rate */	

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品v国产精品v日韩精品| 成人sese在线| 国产亚洲综合色| 91福利区一区二区三区| 精品一区二区三区久久久| 亚洲色图.com| 久久久99精品久久| 7777精品伊人久久久大香线蕉的 | 不卡视频一二三| 日韩av电影天堂| 亚洲欧美国产77777| 久久久久久久久一| 91麻豆精品国产91久久久使用方法 | 亚洲国产一区视频| 欧美国产成人精品| 精品三级av在线| 欧美三级日韩在线| av一区二区久久| 国产成人免费av在线| 日本不卡不码高清免费观看| 一区二区三区在线播放| 日本一二三不卡| 337p粉嫩大胆噜噜噜噜噜91av| 国产91精品在线观看| 中文字幕亚洲区| 国产亚洲欧洲997久久综合 | 欧美精品xxxxbbbb| 欧美视频在线不卡| 欧美综合视频在线观看| 不卡在线视频中文字幕| 国产精品亚洲专一区二区三区 | 精品污污网站免费看| 91污片在线观看| 波多野洁衣一区| 成人白浆超碰人人人人| 国产成人av福利| 国产成人免费网站| 国产69精品一区二区亚洲孕妇| 国产剧情一区在线| 国产成人免费视频网站高清观看视频| 久久精品国产999大香线蕉| 免费一级片91| 狠狠色丁香久久婷婷综合丁香| 麻豆成人av在线| www.欧美日韩| 欧美一区日韩一区| 欧美日韩午夜在线视频| 在线视频欧美精品| 欧美视频你懂的| 7777精品伊人久久久大香线蕉 | 欧美aaaaaa午夜精品| 午夜视频在线观看一区二区| 视频一区视频二区中文| 日韩精品亚洲专区| 免费成人小视频| 国产一区二区网址| 成人午夜又粗又硬又大| 99v久久综合狠狠综合久久| 一本久久a久久免费精品不卡| 日本韩国精品一区二区在线观看| 欧美丝袜自拍制服另类| 69堂亚洲精品首页| 精品国内片67194| 国产精品另类一区| 亚洲一区免费视频| 乱中年女人伦av一区二区| 国产一区二区三区四区五区美女 | 成人av电影免费在线播放| 99久久国产综合精品麻豆| 欧美在线999| 日韩欧美国产精品| 亚洲国产成人一区二区三区| 夜夜嗨av一区二区三区四季av| 天堂资源在线中文精品| 国内一区二区视频| 一本色道久久综合狠狠躁的推荐 | 国内精品不卡在线| 91视频国产观看| 91精品国产美女浴室洗澡无遮挡| 久久影音资源网| 一区二区三区91| 蜜桃视频免费观看一区| 99久久婷婷国产综合精品电影| 欧美视频完全免费看| 国产亚洲自拍一区| 亚洲成a人片综合在线| 国产精品资源网站| 欧美性一区二区| 久久久亚洲国产美女国产盗摄 | 国产麻豆精品在线| 欧美在线看片a免费观看| wwwwww.欧美系列| 一区二区三区四区精品在线视频| 久久精品久久99精品久久| 色诱视频网站一区| 久久伊人蜜桃av一区二区| 亚洲国产一区二区在线播放| 高清在线观看日韩| 91精品在线观看入口| 亚洲男人的天堂网| 国产美女主播视频一区| 3d成人h动漫网站入口| 国产精品久久久久久久久果冻传媒 | 欧美日韩一区精品| 国产精品你懂的| 蜜桃免费网站一区二区三区| 一本一道久久a久久精品 | 日韩欧美一二三四区| 亚洲欧美另类久久久精品| 国产最新精品精品你懂的| 欧美裸体一区二区三区| 亚洲精品国产a久久久久久| 国产91色综合久久免费分享| 日韩欧美国产wwwww| 亚州成人在线电影| 色综合久久99| 亚洲日本在线视频观看| 大白屁股一区二区视频| 久久综合一区二区| 日本不卡在线视频| 欧美群妇大交群中文字幕| 亚洲精品国产视频| 99久久久久久99| 中文字幕乱码日本亚洲一区二区 | 日本不卡的三区四区五区| 欧美午夜电影一区| 夜夜精品浪潮av一区二区三区| 99久免费精品视频在线观看 | 一区二区三区日韩欧美| 97成人超碰视| 中文字幕欧美一区| 成人午夜在线播放| 国产精品久久久久久久第一福利| 国产iv一区二区三区| 欧美激情一区二区三区不卡| 国产精品综合网| 国产欧美日产一区| 高清在线观看日韩| 国产精品久久久久三级| 高清成人在线观看| 国产精品久久久久久亚洲毛片 | av在线播放不卡| 亚洲欧美日本在线| 在线观看国产日韩| 亚洲国产日韩在线一区模特| 欧美日韩五月天| 秋霞午夜鲁丝一区二区老狼| 日韩欧美资源站| 国产一区二区三区视频在线播放| 国产三级久久久| 99久久久久免费精品国产| 韩国精品主播一区二区在线观看| 久久久久久久久久久久久久久99 | 欧美精品日韩精品| 午夜欧美一区二区三区在线播放| 正在播放一区二区| 激情偷乱视频一区二区三区| 国产欧美一区二区精品性色超碰| 成人av午夜影院| 又紧又大又爽精品一区二区| 欧美日韩国产区一| 久久国产乱子精品免费女| 久久久久久久综合日本| 99视频一区二区| 三级欧美在线一区| 欧美精品一区二区不卡| 不卡av在线免费观看| 亚洲精品菠萝久久久久久久| 欧美高清视频不卡网| 激情综合色综合久久| 亚洲欧美中日韩| 3atv在线一区二区三区| 成人性生交大片免费| 亚洲国产视频网站| 久久九九全国免费| 在线观看免费一区| 国内外成人在线| 亚洲色图一区二区三区| 日韩一区二区不卡| kk眼镜猥琐国模调教系列一区二区| 亚洲国产va精品久久久不卡综合| 久久综合给合久久狠狠狠97色69| 99热在这里有精品免费| 免费高清在线视频一区·| 国产精品女同一区二区三区| 制服丝袜亚洲网站| 成人福利视频在线看| 免费成人av在线| 日韩伦理av电影| 精品国精品国产尤物美女| 色婷婷激情久久| 国产精品综合在线视频| 五月综合激情网| 国产精品国产成人国产三级| 日韩欧美一级精品久久| 色婷婷av一区二区| 国产成人av电影免费在线观看| 日本欧美一区二区三区乱码| 亚洲欧美一区二区三区极速播放| 337p粉嫩大胆色噜噜噜噜亚洲|