当前位置: 首页>>代码示例>>C++>>正文


C++ D3DCOLOR_RGBA函数代码示例

本文整理汇总了C++中D3DCOLOR_RGBA函数的典型用法代码示例。如果您正苦于以下问题:C++ D3DCOLOR_RGBA函数的具体用法?C++ D3DCOLOR_RGBA怎么用?C++ D3DCOLOR_RGBA使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了D3DCOLOR_RGBA函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: CMESH

	//================================================================================
	//!	メソッド名	CKAGEO_BALL::コンストラクタ
	//
	//	引数		inDev			Direct3Dデバイス
	//				inKind			ボールの種類
	//	更新		2008/08/26		<新規>
	//================================================================================
	CKAGEO_BALL::CKAGEO_BALL(CONST DEV		inDev,
							KAGEO_BALL_KIND	inKind)	:
	CMESH(inDev, getBallTextureName(inKind))
	{
	//	属性の初期化
		this->activate		= FALSE;
		this->hitG			= NULL;
		this->iFrame		= 0;
		this->sStaticHit	= NULL;

	//	ボールの種類により、初期化処理分岐
		switch(inKind)
		{
		//	シャドウボール
			case	eKOBALL_SHADOW:
			//	見えない影を、見える影にするメッセージ
				this->judgMessage	= eTMSG_NO_SEE_SHADOW;
				this->reactMessage	= eREAMSG_SHADOW_HIT;
				this->setThisMessage(eTMSG_SHADOW_BALL);
			//	エフェクト関連
				this->iEffectCnt	= 3;
				strcpy_s(this->effectName, sizeof(effectName), EFFECT_SHADOW);
			//	煙の色
				this->smokeColor	= D3DCOLOR_RGBA(10, 10, 10, 255);
			//	音を生成
				this->sStaticHit	= new SSTATIC(SOUND_SHADOWB_HIT);
				break;

		//	シャインボール
			case	eKOBALL_SHINE:
			//	見える影を、見えない影にするメッセージ
				this->judgMessage	= eTMSG_SEE_SHADOW;
				this->reactMessage	= eREAMSG_SHINE_HIT;
				this->setThisMessage(eTMSG_SHINE_BALL);
			//	エフェクト関連
				this->iEffectCnt	= 3;
				strcpy_s(this->effectName, sizeof(effectName), EFFECT_SHINE);
			//	音を生成
				this->sStaticHit	= new SSTATIC(SOUND_SHINEB_HIT);
			//	煙の色
				this->smokeColor	= D3DCOLOR_RGBA(255, 255, 200, 255);
				break;

		//	上記以外(エラー数値)
			default:
				this->judgMessage	= eTMSG_NOMSG;
				this->reactMessage	= eREAMSG_NOMSG;
				this->setThisMessage(eTMSG_NOMSG);
				this->iEffectCnt	= 100000;
				strcpy_s(this->effectName, sizeof(effectName), "");
				this->smokeColor	= D3DCOLOR_RGBA(255, 255, 255, 255);
				return;
		}

	//	エフェクトの登録
		C3D_EFFECT_CENTER*	effectCenter = C3D_EFFECT_CENTER::getInstance();
		effectCenter->addEffects(
			this->effectName,
			new C3D_EFFECT(inDev, this->effectName, VEC3(0.0f,0.0f,0.0f)));
	}
开发者ID:jun-ueoka,项目名称:KageTokiGIRL,代码行数:67,代码来源:Class_KageoBall.cpp

示例2: MakeVertexFade

//===========================================================
//	頂点の設定
//===========================================================
void MakeVertexFade(LPDIRECT3DDEVICE9 pDevice){

	//頂点座標	※時計回り注意
	g_aFadeVertex[0].vtx = D3DXVECTOR3(g_tFade.fTexPosX, g_tFade.fTexPosY, 0.0f);	//(X, Y, Z)
	g_aFadeVertex[1].vtx = D3DXVECTOR3(g_tFade.fTexPosX + g_tFade.nTexSizeX, g_tFade.fTexPosY, 0.0f);
	g_aFadeVertex[2].vtx = D3DXVECTOR3(g_tFade.fTexPosX, g_tFade.fTexPosY + g_tFade.nTexSizeY, 0.0f);
	g_aFadeVertex[3].vtx = D3DXVECTOR3(g_tFade.fTexPosX + g_tFade.nTexSizeX, g_tFade.fTexPosY + g_tFade.nTexSizeY, 0.0f);
				   
	//rhw		   
	g_aFadeVertex[0].rhw = 
	g_aFadeVertex[1].rhw = 
	g_aFadeVertex[2].rhw = 
	g_aFadeVertex[3].rhw = 1.0f;	//すべてに1.0fを入れる
				   
	//頂点カラー	  
	g_aFadeVertex[0].diffuse = D3DCOLOR_RGBA(255, 255, 255, g_tFade.nFadeAlpha);
	g_aFadeVertex[1].diffuse = D3DCOLOR_RGBA(255, 255, 255, g_tFade.nFadeAlpha);
	g_aFadeVertex[2].diffuse = D3DCOLOR_RGBA(255, 255, 255, g_tFade.nFadeAlpha);
	g_aFadeVertex[3].diffuse = D3DCOLOR_RGBA(255, 255, 255, g_tFade.nFadeAlpha);
				   
	//テクスチャ座標nCntの設定
	g_aFadeVertex[0].tex = D3DXVECTOR2(0,0);
	g_aFadeVertex[1].tex = D3DXVECTOR2(1,0);
	g_aFadeVertex[2].tex = D3DXVECTOR2(0,1);
	g_aFadeVertex[3].tex = D3DXVECTOR2(1,1);
}
开发者ID:SasakiMizuki,项目名称:MizukiRepository,代码行数:29,代码来源:Fade.cpp

示例3: D3DCOLOR_RGBA

void Screen3D::BlankArea( RECT& Dimensions)
{

	// Figure out the vertices for the main window
	ScreenVertex WindowVertices[4];

	WindowVertices[0].z   = 0;WindowVertices[1].z   = 0;WindowVertices[2].z   = 0;WindowVertices[3].z   = 0;
	WindowVertices[0].RHW = 1;	WindowVertices[1].RHW = 1; WindowVertices[2].RHW = 1; WindowVertices[3].RHW = 1;
	WindowVertices[0].color = D3DCOLOR_RGBA(R, G, B, 255);WindowVertices[1].color = D3DCOLOR_RGBA(R, G, B, 255);
	WindowVertices[2].color = D3DCOLOR_RGBA(R, G, B, 255);WindowVertices[3].color = D3DCOLOR_RGBA(R, G, B, 255);

	WindowVertices[0].x   = Dimensions.left;
	WindowVertices[0].y   = Dimensions.top;

	
	WindowVertices[1].x   = Dimensions.right;
	WindowVertices[1].y   = Dimensions.top;

	WindowVertices[2].x   = Dimensions.left;
	WindowVertices[2].y   = Dimensions.bottom;

	WindowVertices[3].x   = Dimensions.right;
	WindowVertices[3].y   = Dimensions.bottom;

	PolygonsRendered += 2;
	DrawCalls++;

	D3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE,   FALSE);
	D3DDevice->SetRenderState(D3DRS_SRCBLEND,           D3DBLEND_SRCALPHA);
	D3DDevice->SetRenderState(D3DRS_DESTBLEND,          D3DBLEND_INVSRCALPHA);
	SetFVF(D3DFVF_SCREENVERTEX);
	D3DDevice->DrawPrimitiveUP( D3DPT_TRIANGLESTRIP, 2, WindowVertices,  sizeof(ScreenVertex));

}
开发者ID:fathat,项目名称:game-src,代码行数:34,代码来源:Screen.cpp

示例4: memset

BSP::BSP(const char* bspName, AABB boundingBox, int numShaders)
{
    _name = bspName;
    _boundingBox = boundingBox;
    _numShaders  = numShaders;
    if( _numShaders ) 
    {
        _shaders = new Shader*[_numShaders];
        memset( _shaders, 0, sizeof(Shader*)*_numShaders );
    }
    else 
    {
        _shaders = NULL;
    }
    _root = NULL;

    _renderFrameId = 0;

    _fogMode    = D3DFOG_NONE;
    _fogStart   = 300000;
    _fogEnd     = 500000;
    _fogDensity = 0.000005f;
    _fogColor   = D3DCOLOR_RGBA( 255, 255, 255, 255 );

    _shadowCastDirection = Vector( 0,-1,0 );
    _shadowCastColor     = D3DCOLOR_RGBA( 0, 0, 0, 96 );
    _shadowCastDepth     = 100000.0f;

    // create shadow volume pipeline
    _shadowVolume = new ShadowVolume( 4096 );

    _postRenderCallback = NULL;
    _postRenderCallbackData = NULL;
}
开发者ID:cheinkn,项目名称:basextreme,代码行数:34,代码来源:bsp.cpp

示例5: switch

BOOL CDrawGraphics::Fade(CTexture *Tex,int Fade)
{
	//フェード処理
	DWORD t=0;
	DWORD tp=0;
	//Ctrlが押されている間
	//不透明でないならば直す
	if(CtrlOn==TRUE){
		if(Tex->VertexDataTbl[3].color==D3DCOLOR_RGBA(255,255,255,255))return 0;
		for(int i=0;i<4;i++){
			Tex->VertexDataTbl[i].color=D3DCOLOR_RGBA(255,255,255,255);
		}
		return 0;
	}
	

	FadeFlag=TRUE;
	
	switch(Fade){
		MSG msg;
		case FadeOut:
			t=GetTickCount();
			tp=t;
			for(int Alpha=255;Alpha>=0;Alpha-=AFade){
				while(tp+FadeTime>=t){
					t=GetTickCount();
				}
				tp=t;
				for(int i=0;i<4;i++){
					Tex->VertexDataTbl[i].color=D3DCOLOR_RGBA(255,255,255,Alpha);
				}
				if(CtrlOn==FALSE)PeekMessage(&msg,NULL,0,0,PM_REMOVE);//フェード中のクリックやらは無視(Ctrlキー押下時を除く)
				Update();
			}
			break;
		case FadeIn:
			//MessageBox(NULL,"fadein","",MB_OK);
			t=GetTickCount();
			tp=t;
			for(int Alpha=0;Alpha<=255;Alpha+=AFade){
				while(tp+FadeTime>=t){
					t=GetTickCount();
				}
				tp=t;
				for(int i=0;i<4;i++){
					Tex->VertexDataTbl[i].color=D3DCOLOR_RGBA(255,255,255,Alpha);
				}
				if(CtrlOn==FALSE)PeekMessage(&msg,NULL,0,0,PM_REMOVE);//フェード中のクリックやらは無視(Ctrlキー押下時を除く)
				Update();
			}
			break;
		default:
			return 0;
	}
	
	FadeFlag=FALSE;
	return 0;
}
开发者ID:YackSaw,项目名称:test,代码行数:58,代码来源:DrawGraphics.cpp

示例6: GET_VA_ARGS

void CRender::DrawString(bool CenterText, float x, float y, COLOR32 Color, PCoreString szText, ...)
{
	char szBuffer[1024];
	GET_VA_ARGS(szText, szBuffer);

	if (CenterText)
		x -= GetStringWidth(szBuffer) / 2;

	RECT Rect = { (int)x, (int)y, 0, 0 };
	RECT ShadowRect = { (int)x + 1, (int)y, 0, 0 };
	RECT ShadowRect2 = { (int)x + 1, (int)y + 1, 0, 0 };
	RECT ShadowRect3 = { (int)x, (int)y + 1, 0, 0 };
	RECT ShadowRect4 = { (int)x - 1, (int)y + 1, 0, 0 };
	RECT ShadowRect5 = { (int)x - 1, (int)y, 0, 0 };
	RECT ShadowRect6 = { (int)x - 1, (int)y - 1, 0, 0 };
	RECT ShadowRect7 = { (int)x, (int)y - 1, 0, 0 };
	RECT ShadowRect8 = { (int)x + 1, (int)y - 1, 0, 0 };
	pD3DFont->DrawText(NULL, szBuffer, -1, &ShadowRect, DT_LEFT | DT_NOCLIP, D3DCOLOR_RGBA(0, 0, 0, Color.a - 25));
	pD3DFont->DrawText(NULL, szBuffer, -1, &ShadowRect2, DT_LEFT | DT_NOCLIP, D3DCOLOR_RGBA(0, 0, 0, Color.a - 25));
	pD3DFont->DrawText(NULL, szBuffer, -1, &ShadowRect3, DT_LEFT | DT_NOCLIP, D3DCOLOR_RGBA(0, 0, 0, Color.a - 25));
	pD3DFont->DrawText(NULL, szBuffer, -1, &ShadowRect4, DT_LEFT | DT_NOCLIP, D3DCOLOR_RGBA(0, 0, 0, Color.a - 25));
	pD3DFont->DrawText(NULL, szBuffer, -1, &ShadowRect5, DT_LEFT | DT_NOCLIP, D3DCOLOR_RGBA(0, 0, 0, Color.a - 25));
	pD3DFont->DrawText(NULL, szBuffer, -1, &ShadowRect6, DT_LEFT | DT_NOCLIP, D3DCOLOR_RGBA(0, 0, 0, Color.a - 25));
	pD3DFont->DrawText(NULL, szBuffer, -1, &ShadowRect7, DT_LEFT | DT_NOCLIP, D3DCOLOR_RGBA(0, 0, 0, Color.a - 25));
	pD3DFont->DrawText(NULL, szBuffer, -1, &ShadowRect8, DT_LEFT | DT_NOCLIP, D3DCOLOR_RGBA(0, 0, 0, Color.a - 25));
	pD3DFont->DrawText(NULL, szBuffer, -1, &Rect, DT_LEFT | DT_NOCLIP, D3DCOLOR_RGBA(Color.r, Color.g, Color.g, Color.a));
}
开发者ID:godlyeh,项目名称:Direct9-Framework,代码行数:27,代码来源:Font.cpp

示例7:

	//================================================================================
	//!	メソッド名	CSCENE_MOVIE4::render
	//
	//	機能		描画
	//	更新		2009/02/17	<新規>
	//================================================================================
	void
	CSCENE_MOVIE4::render(void)
	{
	//	描画開始
		gDev->renderBegin(D3DCOLOR_RGBA(255,255,255,0));

		DEV	inDev	= this->gDev->getDevice();

	//	オブジェクトのソート
		this->camera->updateCamera();
		this->objMap->squeezeSortByCameraPosition(
			this->camera, &this->camera->getViewPointFinish());

	//	ライトの更新
		this->updateLight();

	//	Zテクスチャシェーダでテクスチャに深度値情報を書き込む
		this->shaderZTexture->begin();
		this->objMap->squeezeDrawWithZTexSha(this->shaderZTexture);
		this->shaderZTexture->end();

		this->gDev->bufferClear(D3DCOLOR_RGBA(255,255,255,255));

	//	空の描画
		gDev->spriteBegin();
		sky->draw(gDev->getSprite());
		gDev->spriteEnd();

	//	カメラでデバイス更新
		this->camera->viewTransform(inDev);

	//	深度バッファシェーダで描画
		this->shaderDepthBuf->setCameraViewProjMatrix(
			&((*this->camera->getMatrixView()) * (*this->camera->getMatrixProjection())));

		kageo->draw(inDev);
		kagemi->draw(inDev);

		this->shaderDepthBuf->begin();
		this->objMap->squeezeDrawWithDepthSha(this->shaderDepthBuf);
		this->shaderDepthBuf->end();

	//	シネマスコープの描画
		direction->directCinemaScopePaintOut();

	//	フォントの描画
		gDev->spriteBegin();
		executeDrawTelop();
		gDev->spriteEnd();

	//	幕の描画
		gDev->renderCurtainInDev();
		gDev->renderEnd();
	}
开发者ID:jun-ueoka,项目名称:KageTokiGIRL,代码行数:60,代码来源:Class_SceneMovie4.cpp

示例8: UpdateColor

	bool UpdateColor()
	{
		DWORD color = D3DCOLOR_RGBA(255, 255, 255, 255);

		if (m_targetted)
			color = D3DCOLOR_RGBA(0, 255, 0, 255);
		else if (m_highlight)
			color = D3DCOLOR_RGBA(0, 255, 255, 255);

		return SetColor(color);
	}
开发者ID:interstellarsurfer,项目名称:MQ2Nav,代码行数:11,代码来源:ModelLoader.cpp

示例9: MakeVertexTitleGameStart

/*******************************************************************************
* MakeVertexTitleGameStart
*******************************************************************************/
HRESULT MakeVertexTitleGameStart(LPDIRECT3DDEVICE9 pDevice)
{

	if(FAILED(pDevice->CreateVertexBuffer(
		sizeof(VERTEX_2D)*NUM_VERTEX,	//頂点データのバッファサイズ 
		D3DUSAGE_WRITEONLY, 
		FVF_VERTEX_2D,					//頂点フォーマット
		D3DPOOL_MANAGED, 
		&g_pVtxBufferTitleGameStart,			//頂点バッファインターフェースのポインタ
		NULL)))
	{
		return E_FAIL;
	}
	{
	//頂点バッファの中身を埋める
	VERTEX_2D *pVtx;

	//頂点データの範囲をロックし、頂点バッファへのポインタを取得
	g_pVtxBufferTitleGameStart->Lock( 0, 0, (void**)&pVtx, 0);

	//頂点座標の設定
	pVtx[0].vtx = D3DXVECTOR3(POLYGON_POS_X_GAMESTART - POLYGON_SIZE_X_GAMESTART/2, POLYGON_POS_Y_GAMESTART - POLYGON_SIZE_Y_GAMESTART/2, 0.0f);
	pVtx[1].vtx = D3DXVECTOR3(POLYGON_POS_X_GAMESTART + POLYGON_SIZE_X_GAMESTART/2, POLYGON_POS_Y_GAMESTART - POLYGON_SIZE_Y_GAMESTART/2, 0.0f);
	pVtx[2].vtx = D3DXVECTOR3(POLYGON_POS_X_GAMESTART - POLYGON_SIZE_X_GAMESTART/2, POLYGON_POS_Y_GAMESTART + POLYGON_SIZE_Y_GAMESTART/2, 0.0f);
	pVtx[3].vtx = D3DXVECTOR3(POLYGON_POS_X_GAMESTART + POLYGON_SIZE_X_GAMESTART/2, POLYGON_POS_Y_GAMESTART + POLYGON_SIZE_Y_GAMESTART/2, 0.0f);

	//rhw
	pVtx[0].rhw = 1.0f;
	pVtx[1].rhw = 1.0f;
	pVtx[2].rhw = 1.0f;
	pVtx[3].rhw = 1.0f;


	//color
	pVtx[0].col = D3DCOLOR_RGBA(255,255,255,255);
	pVtx[1].col = D3DCOLOR_RGBA(255,255,255,255);
	pVtx[2].col = D3DCOLOR_RGBA(255,255,255,255);
	pVtx[3].col = D3DCOLOR_RGBA(255,255,255,255);


	//テクスチャ座標指定
	pVtx[0].tex = D3DXVECTOR2(0.0f, 0.0f);
	pVtx[1].tex = D3DXVECTOR2(1.0f, 0.0f);
	pVtx[2].tex = D3DXVECTOR2(0.0f, 1.0f);
	pVtx[3].tex = D3DXVECTOR2(1.0f, 1.0f);
	
	//D3DXCreateTextureFromFile(pDevice,POLYGON_TEXTURENAME_GAMESTART,&g_pTextureTitleGameStart);
	
	g_pVtxBufferTitleGameStart->Unlock();

	}
	return S_OK;
}
开发者ID:IharaYuuki2,项目名称:Yuuki,代码行数:56,代码来源:Title.cpp

示例10: MakeVertexPlaybar

//=============================================================================
// 頂点情報の作成
//=============================================================================
HRESULT MakeVertexPlaybar(LPDIRECT3DDEVICE9 pDevice)
{
	// オブジェクトの頂点バッファを生成
	if( FAILED( pDevice->CreateVertexBuffer(sizeof(VERTEX_2D) * NUM_VERTEX * MAX_PLAYBAR,		// 頂点データ用に確保するバッファサイズ(バイト単位)
											D3DUSAGE_WRITEONLY,									// 頂点バッファの使用法 
											FVF_VERTEX_2D,										// 使用する頂点フォーマット
											D3DPOOL_MANAGED,									// リソースのバッファを保持するメモリクラスを指定
											&g_pD3DVtxBuffPlaybar,								// 頂点バッファインターフェースへのポインタ
											NULL)))												// NULLに設定
	{
		return E_FAIL;
	}

	{//頂点バッファの中身を埋める
		VERTEX_2D *pVtx;

		// 頂点データの範囲をロックし、頂点バッファへのポインタを取得
		g_pD3DVtxBuffPlaybar->Lock(0, 0, (void**)&pVtx, 0);


		for(int nCntPlayBar = 0; nCntPlayBar < MAX_PLAYBAR; nCntPlayBar++, pVtx += 4)
		{
		// 頂点座標の設定
			//pVtx[0].vtx = D3DXVECTOR3(g_playbar[PLAYBAR_MAX].pos.x - PLAYBAR_SIZE_X / 2, g_playbar[PLAYBAR_MAX].pos.y - PLAYBAR_SIZE_Y / 2, 0.0f);
			//pVtx[1].vtx = D3DXVECTOR3(g_playbar[PLAYBAR_MAX].pos.x + PLAYBAR_SIZE_X / 2, g_playbar[PLAYBAR_MAX].pos.y - PLAYBAR_SIZE_Y / 2, 0.0f);
			//pVtx[2].vtx = D3DXVECTOR3(g_playbar[PLAYBAR_MAX].pos.x - PLAYBAR_SIZE_X / 2, g_playbar[PLAYBAR_MAX].pos.y + PLAYBAR_SIZE_Y / 2, 0.0f);
			//pVtx[3].vtx = D3DXVECTOR3(g_playbar[PLAYBAR_MAX].pos.x + PLAYBAR_SIZE_X / 2, g_playbar[PLAYBAR_MAX].pos.y + PLAYBAR_SIZE_Y / 2, 0.0f);

			// rhwの設定
			pVtx[0].rhw = 1.0f;
			pVtx[1].rhw = 1.0f;
			pVtx[2].rhw = 1.0f;
			pVtx[3].rhw = 1.0f;

			// 反射光の設定
			pVtx[0].diffuse = D3DCOLOR_RGBA(255, 255, 255, 255);
			pVtx[1].diffuse = D3DCOLOR_RGBA(255, 255, 255, 255);
			pVtx[2].diffuse = D3DCOLOR_RGBA(255, 255, 255, 255);
			pVtx[3].diffuse = D3DCOLOR_RGBA(255, 255, 255, 255);

			//// テクスチャ座標の設定
			//pVtx[0].tex = D3DXVECTOR2(0.0f, 0.0f);
			//pVtx[1].tex = D3DXVECTOR2(TEX_PATTERN_SIZE_X, 0.0f);
			//pVtx[2].tex = D3DXVECTOR2(0.0f, TEX_PATTERN_SIZE_Y);
			//pVtx[3].tex = D3DXVECTOR2(TEX_PATTERN_SIZE_X, TEX_PATTERN_SIZE_Y);

			// 頂点データをアンロックする
			g_pD3DVtxBuffPlaybar->Unlock();
		}
	}

	return S_OK;
}
开发者ID:andylam5538,项目名称:sango,代码行数:56,代码来源:playbar.cpp

示例11: D3DCOLOR_RGBA

void CReloadProcess::Draw( int iX, int iY, int iModuleID, int iGraphicID, float fProcessRate )
{
	//sprintf( g_MsgBuf, "%d", 100 - (int)( fProcessRate * 100 ) );
	//drawFontf( g_GameDATA.m_hFONT[ FONT_NORMAL ], true, 2,2 ,g_dwBLACK, g_MsgBuf );
	CTDrawImpl* pDrawObj = g_itMGR.GetDrawImplPtr();
	pDrawObj->DrawCover( iX,
						 iY,
						iModuleID, 
						iGraphicID,
						D3DCOLOR_RGBA( 255, 255, 255, 255 ),
						D3DCOLOR_RGBA(   0,   0,   0, 110 ),
						fProcessRate );
}
开发者ID:PurpleYouko,项目名称:Wibble_Wibble,代码行数:13,代码来源:ReloadProcess.cpp

示例12: D3DXVECTOR4

//-------------------------------------------------------------
// ������ ����
//-------------------------------------------------------------
void CBigSquare::RestoreDeviceObjects( FLOAT sx, FLOAT sy )
{
	SHADOWVERTEX* v;
	m_pVB->Lock( 0, 0, (void**)&v, 0 );
	v[0].p = D3DXVECTOR4(  0, sy, 0.0f, 1.0f );
	v[1].p = D3DXVECTOR4(  0,  0, 0.0f, 1.0f );
	v[2].p = D3DXVECTOR4( sx, sy, 0.0f, 1.0f );
	v[3].p = D3DXVECTOR4( sx,  0, 0.0f, 1.0f );
	v[0].color = D3DCOLOR_RGBA(0,0,0,0x7f);
	v[1].color = D3DCOLOR_RGBA(0,0,0,0x7f);
	v[2].color = D3DCOLOR_RGBA(0,0,0,0x7f);
	v[3].color = D3DCOLOR_RGBA(0,0,0,0x7f);
	m_pVB->Unlock();
}
开发者ID:jjuiddong,项目名称:Dx9-Shader,代码行数:17,代码来源:main.cpp

示例13: ConvertColor

D3DCOLOR ConvertColor(gl::Color color)
{
    return D3DCOLOR_RGBA(gl::unorm<8>(color.red),
                         gl::unorm<8>(color.green),
                         gl::unorm<8>(color.blue),
                         gl::unorm<8>(color.alpha));
}
开发者ID:0x163mL,项目名称:phantomjs,代码行数:7,代码来源:renderer9_utils.cpp

示例14: CSKIN_MESH

	//================================================================================
	//!	メソッド名	CYAMAKAGE_WEAPON::コンストラクタ
	//
	//	引数		inDev			Direct3Dデバイス
	//				inKind			ボールの種類
	//	更新		2009/02/17		<新規>
	//================================================================================
	CYAMAKAGE_WEAPON::CYAMAKAGE_WEAPON(CONST DEV inDev)	:
	CSKIN_MESH(inDev, NAME_YAMAKAGE_WEAPON)
	{
	//	属性の初期化
		this->player			= NULL;
		this->viewG				= NULL;
		this->stageG			= NULL;
		this->weaponAction		= eOPEYW_MAX;
		this->iSmokeFrame		= 0;
		this->iMoveFrame		= 0;
		this->targetLoc			= VEC3(0.0f, 0.0f, 0.0f);
		this->ssEnemyBallShot	= new SSTATIC("shot_shadow");

	//	オリジナル「エネミーボール」の生成
		this->originEnemyBall
			= new CENEMY_BALL(inDev, eENEMYB_STRAIGHT, "shadow_ball", EFFECT_SHADOW);
		this->originEnemyBall->setEffectColor(D3DCOLOR_RGBA(100,100,100,255));
		this->originEnemyBall->setReactMessage(eREAMSG_ENEMY_ATTACK_LV1);

	//	エフェクトの登録
		C3D_EFFECT_CENTER*	effectCenter = C3D_EFFECT_CENTER::getInstance();
		effectCenter->addEffects(
			EFFECT_SMOKE, new C3D_EFFECT(inDev, EFFECT_SMOKE, VEC3(0.0f,0.0f,0.0f)));

	//	浮遊中に変更
		this->setWeaponAction(eOPEYW_FLOATING);
	//	アニメーションの初期化
		this->changeAnimationAndBlend(0);
	//	オブジェクトの種類を見える影に変更
		this->setThisMessage(eTMSG_SEE_SHADOW);
	}
开发者ID:jun-ueoka,项目名称:KageTokiGIRL,代码行数:38,代码来源:Class_YamakageWeapon.cpp

示例15: srand

 Engine::Engine()
 {
     srand((unsigned int)time(NULL));
     p_maximizeProcessor = false;
     p_frameCount_core = 0;
     p_frameRate_core = 0;
     p_frameCount_real = 0;
     p_frameRate_real = 0;
     p_ambientColor = D3DCOLOR_RGBA(255,255,255, 0);
     p_windowHandle = 0;
     p_pauseMode = false;
     p_versionMajor = VERSION_MAJOR;
     p_versionMinor = VERSION_MINOR;
     p_revision = REVISION;
     
     //set default values
     this->setAppTitle("Advanced2D");
     this->setScreenWidth(640);
     this->setScreenHeight(480);
     this->setColorDepth(32);
     this->setFullscreen(false);
     
     //window handle must be set later on for DirectX!
     this->setWindowHandle(0);
 
 }
开发者ID:Guy-Sensei,项目名称:PiratePlunder,代码行数:26,代码来源:Advanced2D.cpp


注:本文中的D3DCOLOR_RGBA函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。