本文整理汇总了C++中CTexture::GetTextureInfo方法的典型用法代码示例。如果您正苦于以下问题:C++ CTexture::GetTextureInfo方法的具体用法?C++ CTexture::GetTextureInfo怎么用?C++ CTexture::GetTextureInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CTexture
的用法示例。
在下文中一共展示了CTexture::GetTextureInfo方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
bool CEffHit008::Draw( CD3DDraw *draw )
{
CTexture *tex;
D3DXIMAGE_INFO texInfo;
CSprite::Draw();
// 描画
// 画像表示基準点
StImageData *anime ;
anime = &m_Anime.GetCurrentMotion()->m_Image ;
tex = m_Tex->GetTexture( anime->m_TextureNo ) ;
tex->GetTextureInfo( &texInfo ) ;
// 描画
// m_DispObj->SetBlendColor( D3DCOLOR_ARGB(200,255,0,0) );
// m_DispObj->SetRotation( 1,-90,0,0, 0, 0);
m_DispObj->SetTexture( tex );
m_DispObj->SetDestRect( m_X - anime->m_BaseX , m_Y - anime->m_BaseY,
m_X - anime->m_BaseX + (long)texInfo.Width ,
m_Y - anime->m_BaseY + (long)texInfo.Height );
draw->Draw( m_DispObj );
return TRUE;
}
示例2:
bool CEffAttack001::Draw( CD3DDraw *draw )
{
CTexture *tex;
D3DXIMAGE_INFO texInfo;
CSprite::Draw();
// 描画
// 画像表示基準点
StImageData *anime ;
anime = &m_Anime.GetCurrentMotion()->m_Image ;
tex = m_Tex->GetTexture( anime->m_TextureNo ) ;
tex->GetTextureInfo( &texInfo ) ;
// 描画
// m_DispObj->SetRotation( 1,-90,0,0, 0, 0);
m_DispObj->SetTexture( tex );
m_DispObj->SetDestRect( m_X - anime->m_BaseX * m_Dir , m_Y - anime->m_BaseY ,
m_X + ( ((long)texInfo.Width - anime->m_BaseX) * m_Dir ),
m_Y + ( (long)texInfo.Height - anime->m_BaseY ) );
draw->Draw( m_DispObj );
return TRUE;
}
示例3:
bool CEffAction003::Draw( CD3DDraw *draw )
{
CTexture *tex;
D3DXIMAGE_INFO texInfo;
CSprite::Draw();
// 描画
// 画像表示基準点
StImageData *anime ;
anime = &m_Anime.GetCurrentMotion()->m_Image ;
tex = m_Tex->GetTexture( anime->m_TextureNo ) ;
tex->GetTextureInfo( &texInfo ) ;
// 描画
m_DispObj->SetBlendColor( D3DCOLOR_ARGB( 240 - m_Flame * 8 , 255,255,255 ) );
m_DispObj->SetTexture( tex );
m_DispObj->SetDestRect( m_X - anime->m_BaseX - m_Flame * 2 , m_Y - anime->m_BaseY - m_Flame * 2,
m_X - anime->m_BaseX + (long)texInfo.Width + m_Flame * 2,
m_Y - anime->m_BaseY + (long)texInfo.Height + m_Flame * 2 );
draw->Draw( m_DispObj );
return TRUE;
}
示例4: Draw
bool CSprite::Draw( CD3DDraw *draw )
{
CTexture *tex;
D3DXIMAGE_INFO texInfo;
Draw();
// 描画
// 画像表示基準点
StImageData *anime ;
anime = &m_Anime.GetCurrentMotion()->m_Image;
/* 旧
ST_IMAGE_DATA *anime ;
anime = &m_Anime->m_AnimeData[m_AnimeImage] ;
tex = m_Tex->GetTexture( m_Anime->m_AnimeData[m_AnimeImage].m_TextureNo ) ;
*/
tex = m_Tex->GetTexture( anime->m_TextureNo ) ;
tex->GetTextureInfo( &texInfo ) ;
m_DispObj->SetTexture( tex );
m_DispObj->SetDestRect( m_X - anime->m_BaseX , m_Y - anime->m_BaseY ,
m_X + ( (long)texInfo.Width - anime->m_BaseX ),
m_Y + ( (long)texInfo.Height - anime->m_BaseY ) );
draw->Draw( m_DispObj );
return TRUE;
}
示例5:
bool CSysLogo2::Draw( CD3DDraw *draw )
{
CD3DDraw2 *draw2 = (CD3DDraw2*)(draw) ;
CTexture *tex;
D3DXIMAGE_INFO texInfo;
Draw();
// 描画
// 画像表示基準点
StImageData *anime ;
anime = &m_Anime.GetCurrentMotion()->m_Image;
/* 旧
ST_IMAGE_DATA *anime ;
anime = &m_Anime->m_AnimeData[m_AnimeImage] ;
tex = m_Tex->GetTexture( m_Anime->m_AnimeData[m_AnimeImage].m_TextureNo ) ;
*/
tex = m_Tex->GetTexture( anime->m_TextureNo ) ;
tex->GetTextureInfo( &texInfo ) ;
m_DispObj->SetTexture( tex );
m_DispObj->SetDestRect( m_X - anime->m_BaseX , m_Y - anime->m_BaseY ,
m_X + ( 800 - anime->m_BaseX ),
m_Y + ( 600 - anime->m_BaseY ) );
if( m_State == 0 ){
m_DispObj->SetBlendColor( D3DCOLOR_ARGB( m_Flame ,0xff,0xff,0xff ));
}
else{
m_DispObj->SetBlendColor( D3DCOLOR_ARGB( 255-m_Flame ,0xff,0xff,0xff ));
}
draw2->Draw( m_DispObj );
// draw2->Draw2( m_DispObj , m_Flame );
return FALSE;
}
示例6: Draw
bool CTitleRod::Draw( CD3DDraw *draw )
{
CTexture *tex;
D3DXIMAGE_INFO texInfo;
CSprite::Draw();
StImageData *anime ;
switch( m_State ){
case 0:
// 描画
// 画像表示基準点
anime = &m_Anime.GetCurrentMotion()->m_Image ;
tex = m_Tex->GetTexture( anime->m_TextureNo ) ;
tex->GetTextureInfo( &texInfo ) ;
// 描画
m_DispObj->SetTexture( tex );
m_DispObj->SetDestRect( m_X - anime->m_BaseX , m_Y - anime->m_BaseY ,
m_X + ( ((long)texInfo.Width - anime->m_BaseX)),
m_Y + ( (long)texInfo.Height - anime->m_BaseY ) );
draw->Draw( m_DispObj );
break;
case 1:
case 2:
// 描画
// 画像表示基準点
anime = &m_Anime.GetCurrentMotion()->m_Image ;
tex = m_Tex->GetTexture( anime->m_TextureNo ) ;
tex->GetTextureInfo( &texInfo ) ;
// 描画
m_DispObj->SetTexture( tex );
m_DispObj->SetDestRect( m_X - m_RodDx , m_Y - m_RodDy ,
m_X + m_RodDx , m_Y + m_RodDy );
draw->Draw( m_DispObj );
break;
case 3:
// 描画
// 画像表示基準点
anime = &m_Anime.GetCurrentMotion()->m_Image ;
tex = m_Tex->GetTexture( anime->m_TextureNo ) ;
tex->GetTextureInfo( &texInfo ) ;
// 描画
m_DispObj->SetBlendColor( D3DCOLOR_ARGB(255-(255/60*m_Flame),255,255,255) );
m_DispObj->SetTexture( tex );
m_DispObj->SetDestRect( m_X - m_RodDx , m_Y - m_RodDy ,
m_X + m_RodDx , m_Y + m_RodDy );
draw->Draw( m_DispObj );
// 描画
// 画像表示基準点
anime = &m_Anime.GetMotionData( 17 )->m_Image ;
tex = m_Tex->GetTexture( anime->m_TextureNo ) ;
tex->GetTextureInfo( &texInfo ) ;
// 描画
m_DispObj->SetBlendColor( D3DCOLOR_ARGB((255/60*m_Flame),255,255,255) );
m_DispObj->SetTexture( tex );
m_DispObj->SetDestRect( m_TargetX - anime->m_BaseX , m_TargetY - anime->m_BaseY ,
m_TargetX + ( ((long)texInfo.Width - anime->m_BaseX)),
m_TargetY + ( (long)texInfo.Height - anime->m_BaseY ) );
draw->Draw( m_DispObj );
break;
case 4:
// 描画
// 画像表示基準点
anime = &m_Anime.GetMotionData( 17 )->m_Image ;
tex = m_Tex->GetTexture( anime->m_TextureNo ) ;
tex->GetTextureInfo( &texInfo ) ;
// 描画
m_DispObj->SetBlendColor( D3DCOLOR_ARGB(255,255,255,255));
m_DispObj->SetTexture( tex );
m_DispObj->SetDestRect( m_TargetX - anime->m_BaseX , m_TargetY - anime->m_BaseY ,
m_TargetX + ( ((long)texInfo.Width - anime->m_BaseX)),
m_TargetY + ( (long)texInfo.Height - anime->m_BaseY ) );
draw->Draw( m_DispObj );
break;
case 5:
m_DispObj->SetDestBlend(D3DBLEND_ZERO);
m_DispObj->SetSrcBlend(D3DBLEND_SRCALPHA);
// 描画
// 画像表示基準点
anime = &m_Anime.GetMotionData( 17 )->m_Image ;
tex = m_Tex->GetTexture( anime->m_TextureNo ) ;
tex->GetTextureInfo( &texInfo ) ;
// 描画
m_DispObj->SetBlendColor( D3DCOLOR_ARGB( 255,255,255,255 ));
m_DispObj->SetTexture( tex );
m_DispObj->SetDestRect( m_TargetX - anime->m_BaseX , m_TargetY - anime->m_BaseY ,
m_TargetX + ( ((long)texInfo.Width - anime->m_BaseX)),
m_TargetY + ( (long)texInfo.Height - anime->m_BaseY ) );
draw->Draw( m_DispObj );
//.........这里部分代码省略.........
示例7: Draw
/*bool CBattleMenu::FlameResult()
{
return TRUE;
}
*/
bool CBattleMenu::Draw( CD3DDraw *draw )
{
CTexture *tex;
D3DXIMAGE_INFO texInfo;
CSprite::Draw();
m_DispObj->SetBlendColor( 0xa0ffffff );
m_DispObj->SetRotation( 1,0,0,0, 0, 0);
StImageData *anime ;
if( m_State != 1 ){
return true;
}
// 描画(背景)
// 画像表示基準点
anime = &m_Anime.GetMotionData(0)->m_Image ;
tex = m_Tex->GetTexture( anime->m_TextureNo ) ;
tex->GetTextureInfo( &texInfo ) ;
// 描画(背景)
m_DispObj->SetTexture( tex );
m_DispObj->SetDestRect( 0, 0, 800, 600 );
draw->Draw( m_DispObj );
// 描画(項目)
// 画像表示基準点
m_DispObj->SetRotation( 1,0,0,0, 0, 0);
for( int i = 1 ; i < CDataBattleMenu::SELECT_TOP_MAX_VALUE ; i++ ){
if( m_SelectTop == i ){
m_DispObj->SetBlendColor( 0xffffffff );
}
else{
m_DispObj->SetBlendColor( 0xff666666 );
}
anime = &m_Anime.GetMotionData(i)->m_Image ;
tex = m_Tex->GetTexture( anime->m_TextureNo ) ;
tex->GetTextureInfo( &texInfo ) ;
// 描画(背景)
m_DispObj->SetTexture( tex );
m_DispObj->SetDestRect( 200 , 50 + 40 * i,
200 + (long)texInfo.Width, 50 + 40 * i + (long)texInfo.Height );
draw->Draw( m_DispObj );
}
// 描画(選択)
// 画像表示基準点
m_DispObj->SetRotation( 1,0,0,0, 0, 0);
for( int i = 1 ; i < CDataBattleMenu::SELECT_TOP_MAX_VALUE ; i++ ){
if( m_SelectItemEnable[i] == true ){
if( m_SelectTop == i ){
m_DispObj->SetBlendColor( 0xffffffff );
}
else{
m_DispObj->SetBlendColor( 0xff666666 );
}
if( m_SelectItemEnable[i] == true ){
anime = &m_Anime.GetMotionData( m_SelectItemImageNo[i][m_Data->GetValue(i)])->m_Image ;
tex = m_Tex->GetTexture( anime->m_TextureNo ) ;
tex->GetTextureInfo( &texInfo ) ;
// 描画(背景)
m_DispObj->SetTexture( tex );
m_DispObj->SetDestRect( 500 , 50 + 40 * i,
500 + (long)texInfo.Width, 50 + 40 * i + (long)texInfo.Height );
draw->Draw( m_DispObj );
}
}
}
return true;
}
示例8: Draw
bool CTitleLogo::Draw( CD3DDraw *draw )
{
CTexture *tex;
D3DXIMAGE_INFO texInfo;
CSprite::Draw();
StImageData *anime ;
switch( m_State ){
case 0:
m_DispObj->SetDestBlend(D3DBLEND_ZERO);
m_DispObj->SetSrcBlend(D3DBLEND_SRCALPHA);
// 描画
// 画像表示基準点
anime = &m_Anime.GetMotionData( 2 )->m_Image ;
tex = m_Tex->GetTexture( anime->m_TextureNo ) ;
tex->GetTextureInfo( &texInfo ) ;
// 描画
m_DispObj->SetBlendColor(D3DCOLOR_ARGB(((int)((float)254/60*m_Flame)),255,255,255));
m_DispObj->SetTexture( tex );
m_DispObj->SetDestRect( m_X - anime->m_BaseX , m_Y - anime->m_BaseY,
m_X + (long)texInfo.Width - anime->m_BaseX,
m_Y + (long)texInfo.Height - anime->m_BaseY );
draw->Draw( m_DispObj );
break;
case 1:
m_DispObj->SetDestBlend(D3DBLEND_ZERO);
m_DispObj->SetSrcBlend(D3DBLEND_ONE);
// 描画
// 画像表示基準点
anime = &m_Anime.GetMotionData( 2 )->m_Image ;
tex = m_Tex->GetTexture( anime->m_TextureNo ) ;
tex->GetTextureInfo( &texInfo ) ;
// 描画
m_DispObj->SetBlendColor(D3DCOLOR_ARGB(255,255,255,255));
m_DispObj->SetTexture( tex );
m_DispObj->SetDestRect( m_X - anime->m_BaseX , m_Y - anime->m_BaseY,
m_X + (long)texInfo.Width - anime->m_BaseX,
m_Y + (long)texInfo.Height - anime->m_BaseY );
draw->Draw( m_DispObj );
break;
case 2:
m_DispObj->SetDestBlend(D3DBLEND_ONE);
m_DispObj->SetSrcBlend(D3DBLEND_SRCALPHA);
// 描画
// 画像表示基準点
anime = &m_Anime.GetMotionData( 2 )->m_Image ;
tex = m_Tex->GetTexture( anime->m_TextureNo ) ;
tex->GetTextureInfo( &texInfo ) ;
// 描画
m_DispObj->SetBlendColor( D3DCOLOR_ARGB(254-(int)((float)254/60*m_Flame),255,255,255) );
m_DispObj->SetTexture( tex );
m_DispObj->SetDestRect( m_X - anime->m_BaseX , m_Y - anime->m_BaseY,
m_X + (long)texInfo.Width - anime->m_BaseX,
m_Y + (long)texInfo.Height - anime->m_BaseY );
draw->Draw( m_DispObj );
break;
}
return TRUE;
}
示例9: Draw
bool CScnHpGauge::Draw( CD3DDraw *draw )
{
CTexture *tex;
D3DXIMAGE_INFO texInfo;
// 描画
// 画像表示基準点
StImageData *anime ;
int baseX, baseY ;
// 描画 バック赤
anime = &m_Anime.GetActionData(1)->GetMotionData(1)->m_Image;
tex = m_Tex->GetTexture( anime->m_TextureNo ) ;
tex->GetTextureInfo( &texInfo ) ;
m_DispObj->SetTexture( tex );
/// m_DispObj->SetBlendColor( 0xffff0000 );
m_DispObj->SetBlendColor( 0xffffffff );
if( m_Player == 1 ){
baseX = m_X + 12;
baseY = m_Y + 8;
m_DispObj->SetDestRect( baseX - anime->m_BaseX , baseY - anime->m_BaseY ,
baseX + ( 315 * m_CurrentHp / 10000) , //m_Target->m_Spec.MAX_HP,
baseY + 23 );
}
else{
baseX = m_X + 315;
baseY = m_Y + 8;
m_DispObj->SetDestRect( baseX + ( (long)texInfo.Width - anime->m_BaseX ),
baseY - anime->m_BaseY,
baseX - ( 315 * m_CurrentHp / 10000),//m_Target->m_Spec.MAX_HP,
baseY + 23 );
}
//// draw->Draw( m_DispObj );
// 描画 身
anime = &m_Anime.GetActionData(1)->GetMotionData(0)->m_Image;
tex = m_Tex->GetTexture( anime->m_TextureNo ) ;
tex->GetTextureInfo( &texInfo ) ;
m_DispObj->SetTexture( tex );
m_DispObj->SetBlendColor( 0xffffffff );
if( m_Player == 1 ){
// baseX = m_X + 12;
// baseY = m_Y + 8;
baseX = m_X + 87;
baseY = m_Y + 32;
// m_DispObj->SetDestRect( baseX - anime->m_BaseX , baseY - anime->m_BaseY ,
// baseX + ( 315 * m_Target->GetHpGauge() / 10000) , //m_Target->m_Spec.MAX_HP,
// baseY + 23 );
m_DispObj->SetDestRect( baseX + (long)texInfo.Width - ( (long)texInfo.Width * m_Target->GetHpGauge() / 10000),
baseY - anime->m_BaseY ,
baseX + (long)texInfo.Width , //m_Target->m_Spec.MAX_HP,
baseY + 20 );
}
else{
// baseX = m_X + 338;
// baseY = m_Y + 8;
baseX = m_X + 84;
baseY = m_Y + 32;
// m_DispObj->SetDestRect( baseX + ( (long)texInfo.Width - anime->m_BaseX ),
// baseY - anime->m_BaseY,
// baseX - ( 315 * m_Target->GetHpGauge() / 10000),//m_Target->m_Spec.MAX_HP,
// baseY + 23 );
m_DispObj->SetDestRect( baseX ,
baseY - anime->m_BaseY,
baseX + ( (long)texInfo.Width * m_Target->GetHpGauge() / 10000),//m_Target->m_Spec.MAX_HP,
baseY + 20 );
}
draw->Draw( m_DispObj );
// 描画 枠
// anime = &m_Anime.GetMotionData(0)->m_Image;
// anime = &m_Anime.GetCurrentMotion()->m_Image;
anime = &m_Anime.GetActionData(0)->GetMotionData(0)->m_Image;
tex = m_Tex->GetTexture( anime->m_TextureNo ) ;
tex->GetTextureInfo( &texInfo ) ;
m_DispObj->SetTexture( tex );
if( m_Player == 1 ){
baseX = m_X -5;
baseY = m_Y;
m_DispObj->SetDestRect( baseX - anime->m_BaseX , m_Y - anime->m_BaseY ,
baseX + ( (long)texInfo.Width - anime->m_BaseX ),
m_Y + ( (long)texInfo.Height - anime->m_BaseY ) );
}
else{
baseX = m_X + 31;
baseY = m_Y;
m_DispObj->SetDestRect( baseX + ( (long)texInfo.Width - anime->m_BaseX ),
m_Y - anime->m_BaseY,
baseX - anime->m_BaseX,
m_Y + ( (long)texInfo.Height - anime->m_BaseY ) );
}
draw->Draw( m_DispObj );
return true;
}