get rid of some GetSize calls
This commit is contained in:
@@ -85,7 +85,7 @@ public:
|
|||||||
int GetImageFrameHeight() const {return GetImageHeight() / GetFramesHigh();}
|
int GetImageFrameHeight() const {return GetImageHeight() / GetFramesHigh();}
|
||||||
|
|
||||||
FRECT* GetTextureCoordRect( int uFrameNo ) {return &m_TextureCoordRects[uFrameNo];}
|
FRECT* GetTextureCoordRect( int uFrameNo ) {return &m_TextureCoordRects[uFrameNo];}
|
||||||
int GetNumFrames() const {return m_TextureCoordRects.GetSize();}
|
int GetNumFrames() const {return m_TextureCoordRects.size();}
|
||||||
CString GetFilePath() const {return m_sFilePath;}
|
CString GetFilePath() const {return m_sFilePath;}
|
||||||
|
|
||||||
int m_iRefCount;
|
int m_iRefCount;
|
||||||
|
|||||||
@@ -114,6 +114,8 @@ public:
|
|||||||
float m_fMusicLengthSeconds;
|
float m_fMusicLengthSeconds;
|
||||||
float m_fFirstBeat;
|
float m_fFirstBeat;
|
||||||
float m_fLastBeat;
|
float m_fLastBeat;
|
||||||
|
float GetFirstBeat() const;
|
||||||
|
float GetLastBeat() const;
|
||||||
float m_fMusicSampleStartSeconds;
|
float m_fMusicSampleStartSeconds;
|
||||||
float m_fMusicSampleLengthSeconds;
|
float m_fMusicSampleLengthSeconds;
|
||||||
|
|
||||||
@@ -148,7 +150,7 @@ public:
|
|||||||
{
|
{
|
||||||
fMaxBPM = 0;
|
fMaxBPM = 0;
|
||||||
fMinBPM = 100000; // inf
|
fMinBPM = 100000; // inf
|
||||||
for( int i=0; i<m_BPMSegments.GetSize(); i++ )
|
for( unsigned i=0; i<m_BPMSegments.size(); i++ )
|
||||||
{
|
{
|
||||||
const BPMSegment &seg = m_BPMSegments[i];
|
const BPMSegment &seg = m_BPMSegments[i];
|
||||||
fMaxBPM = max( seg.m_fBPM, fMaxBPM );
|
fMaxBPM = max( seg.m_fBPM, fMaxBPM );
|
||||||
@@ -157,21 +159,21 @@ public:
|
|||||||
};
|
};
|
||||||
float GetBPMAtBeat( float fBeat ) const
|
float GetBPMAtBeat( float fBeat ) const
|
||||||
{
|
{
|
||||||
for( int i=0; i<m_BPMSegments.GetSize()-1; i++ )
|
for( unsigned i=0; i<m_BPMSegments.size()-1; i++ )
|
||||||
if( m_BPMSegments[i+1].m_fStartBeat > fBeat )
|
if( m_BPMSegments[i+1].m_fStartBeat > fBeat )
|
||||||
break;
|
break;
|
||||||
return m_BPMSegments[i].m_fBPM;
|
return m_BPMSegments[i].m_fBPM;
|
||||||
};
|
};
|
||||||
BPMSegment& GetBPMSegmentAtBeat( float fBeat )
|
BPMSegment& GetBPMSegmentAtBeat( float fBeat )
|
||||||
{
|
{
|
||||||
for( int i=0; i<m_BPMSegments.GetSize()-1; i++ )
|
for( unsigned i=0; i<m_BPMSegments.size()-1; i++ )
|
||||||
if( m_BPMSegments[i+1].m_fStartBeat > fBeat )
|
if( m_BPMSegments[i+1].m_fStartBeat > fBeat )
|
||||||
break;
|
break;
|
||||||
return m_BPMSegments[i];
|
return m_BPMSegments[i];
|
||||||
};
|
};
|
||||||
CString GetBackgroundAtBeat( float fBeat )
|
CString GetBackgroundAtBeat( float fBeat )
|
||||||
{
|
{
|
||||||
for( int i=0; i<m_BackgroundChanges.GetSize()-1; i++ )
|
for( unsigned i=0; i<m_BackgroundChanges.size()-1; i++ )
|
||||||
if( m_BackgroundChanges[i+1].m_fStartBeat > fBeat )
|
if( m_BackgroundChanges[i+1].m_fStartBeat > fBeat )
|
||||||
break;
|
break;
|
||||||
return m_BackgroundChanges[i].m_sBGName;
|
return m_BackgroundChanges[i].m_sBGName;
|
||||||
|
|||||||
Reference in New Issue
Block a user