Skip to content

Commit

Permalink
Modified DrawTextureQueued and DrawQueueItem.
Browse files Browse the repository at this point in the history
  • Loading branch information
jte committed Apr 7, 2010
1 parent 8f85e35 commit 3e99dab
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion MTA10/core/CGraphics.cpp
Expand Up @@ -590,6 +590,10 @@ bool CGraphics::DrawTextureQueued ( float fX, float fY,
float fRotation,
float fRotCenOffX,
float fRotCenOffY,
float fStartX,
float fStartY,
float fEndX,
float fEndY,
unsigned long ulColor,
bool bPostGUI )
{
Expand All @@ -604,6 +608,10 @@ bool CGraphics::DrawTextureQueued ( float fX, float fY,
Item.Texture.fRotation = fRotation;
Item.Texture.fRotCenOffX = fRotCenOffX;
Item.Texture.fRotCenOffY = fRotCenOffY;
Item.Texture.fStartX = fStartX;
Item.Texture.fStartY = fStartY;
Item.Texture.fEndX = fEndX;
Item.Texture.fEndY = fEndY;
Item.Texture.ulColor = ulColor;

if ( !Item.Texture.texture )
Expand Down Expand Up @@ -999,9 +1007,10 @@ void CGraphics::DrawQueueItem ( const sDrawQueueItem& Item )
D3DXVECTOR2 scaling ( Item.Texture.fWidth / texureWidth, Item.Texture.fHeight / texureHeight );
D3DXVECTOR2 rotationCenter ( Item.Texture.fWidth * 0.5f + Item.Texture.fRotCenOffX, Item.Texture.fHeight * 0.5f + Item.Texture.fRotCenOffY );
D3DXVECTOR2 position ( Item.Texture.fX, Item.Texture.fY );
RECT cutImagePos ( Item.Texture.fStartX, Item.Texture.fStartY, Item.Texture.fEndX, Item.Texture.fEndY );
D3DXMatrixTransformation2D ( &matrix, NULL, 0.0f, &scaling, &rotationCenter, fRotationRad, &position );
m_pDXSprite->SetTransform ( &matrix );
m_pDXSprite->Draw ( Item.Texture.texture, NULL, NULL, NULL, Item.Texture.ulColor );
m_pDXSprite->Draw ( Item.Texture.texture, cutImagePos, NULL, NULL, Item.Texture.ulColor );
break;
}
// Circle type?
Expand Down

0 comments on commit 3e99dab

Please sign in to comment.