-
Автор темы
- #1
Good day to all, so much time has passed, and I am still tormented by the question: "How to fix it?". Please, please help me with my problem, and please don't hate. I will be grateful.
erorr:
line 58 and 20:
erorr:
Error C2102 "&" requires the left-hand value internal_hvh C:\fatality\fatality_gui\menu\controls\window.cpp 68
line 58 and 20:
Source Code:
if ( img && sprite )
{
D3DXMATRIX world;
D3DXMATRIX rotation;
D3DXMATRIX scale;
D3DXMATRIX translation;
D3DXMatrixIdentity( &world );
D3DXMatrixScaling( &scale, 1.f, .6f, 1.f );
D3DXMatrixRotationYawPitchRoll( &rotation, 0.f, 0.f, 0.f );
D3DXMatrixTranslation( &translation, 0.f, 0.f, 0.f );
world = rotation * scale * translation;
D3DSURFACE_DESC img_info;
img->GetLevelDesc( 0, &img_info );
sprite->SetTransform( &world );
sprite->Begin( D3DXSPRITE_ALPHABLEND );
sprite->Draw( img, NULL, NULL, &D3DXVECTOR3( m_tabarea.x + ( m_tabarea.w / 2 ) - static_cast< int >( img_info.Width / 2 ) + 1, m_tabarea.y * 1.6666666f + 25.f, 0.f ), D3DCOLOR_RGBA( 255, 255, 255, 255 ) );
sprite->End();
}
if ( img_big == NULL )
D3DXCreateTextureFromFileInMemory( render::get().get_device(), &DATA_BIG, sizeof( DATA_BIG ), &img_big );
if ( sprite_big == NULL )
D3DXCreateSprite( render::get().get_device(), &sprite_big );
if ( img_big && sprite_big )
{
D3DXMATRIX world;
D3DXMATRIX rotation;
D3DXMATRIX scale;
D3DXMATRIX translation;
D3DXMatrixIdentity( &world );
D3DXMatrixScaling( &scale, .55f, .6f, 1.f );
D3DXMatrixRotationYawPitchRoll( &rotation, 0.f, 0.f, 0.f );
D3DXMatrixTranslation( &translation, 0.f, 0.f, 0.f );
world = rotation * scale * translation;
D3DSURFACE_DESC img_info;
img_big->GetLevelDesc( 0, &img_info );
D3DVIEWPORT9 backup;
render::get().get_device()->GetViewport( &backup );
D3DVIEWPORT9 new_vp;
new_vp.X = m_area.x;
new_vp.Y = m_area.y;
new_vp.Width = m_area.w;
new_vp.Height = m_area.h;
render::get().get_device()->SetViewport( &new_vp );
sprite_big->SetTransform( &world );
sprite_big->Begin( D3DXSPRITE_ALPHABLEND );
sprite_big->Draw( img_big, NULL, NULL, &D3DXVECTOR3( m_area.x * 1.8333333f + 16, m_area.y * 1.6666666f + 16, 0.f ), D3DCOLOR_RGBA( 255, 255, 255, 255 ) );
sprite_big->End();
render::get().get_device()->SetViewport( &backup );
}
for ( auto tab : m_tabs )
{
if ( tab->update() )
m_selected_tab = tab;
tab->render( ( m_selected_tab == tab ) );
}
}