This commit is contained in:
Steve Checkoway
2005-10-29 12:22:43 +00:00
parent 3c0deebeba
commit 4ce7d47899
+4 -2
View File
@@ -265,7 +265,7 @@ void Sprite::LoadFromTexture( RageTextureID ID )
// Assume the frames of this animation play in sequential order with 0.1 second delay. // Assume the frames of this animation play in sequential order with 0.1 second delay.
m_States.clear(); m_States.clear();
for( int i=0; i<m_pTexture->GetNumFrames(); i++ ) for( int i=0; i<m_pTexture->GetNumFrames(); ++i )
{ {
State newState = { i, 0.1f }; State newState = { i, 0.1f };
m_States.push_back( newState ); m_States.push_back( newState );
@@ -430,7 +430,7 @@ void Sprite::DrawTexture( const TweenState *state )
#define IF_CROP_POS(side,opp_side) \ #define IF_CROP_POS(side,opp_side) \
if(state->crop.side!=0) \ if(state->crop.side!=0) \
croppedQuadVerticies.side = \ croppedQuadVerticies.side = \
SCALE( crop.side, 0.f, 1.f, quadVerticies.side, quadVerticies.opp_side ); SCALE( crop.side, 0.f, 1.f, quadVerticies.side, quadVerticies.opp_side )
IF_CROP_POS( left, right ); IF_CROP_POS( left, right );
IF_CROP_POS( top, bottom ); IF_CROP_POS( top, bottom );
IF_CROP_POS( right, left ); IF_CROP_POS( right, left );
@@ -834,7 +834,9 @@ void Sprite::ScaleToClipped( float fWidth, float fHeight )
Sprite::SetCustomImageCoords( fCustomImageCoords ); Sprite::SetCustomImageCoords( fCustomImageCoords );
if( fWidth != -1 && fHeight != -1 ) if( fWidth != -1 && fHeight != -1 )
{
m_size = RageVector2( fWidth, fHeight ); m_size = RageVector2( fWidth, fHeight );
}
else else
{ {
/* If no crop size is set, then we're only being used to crop diagonal /* If no crop size is set, then we're only being used to crop diagonal