diff --git a/stepmania/src/Banner.cpp b/stepmania/src/Banner.cpp index 7aab3f0875..b6bef44f7e 100644 --- a/stepmania/src/Banner.cpp +++ b/stepmania/src/Banner.cpp @@ -52,7 +52,7 @@ void Banner::Update( float fDeltaTime ) m_fPercentScrolling += fDeltaTime/2; m_fPercentScrolling -= (int)m_fPercentScrolling; - const RectF *pTextureRect = m_pTexture->GetTextureCoordRect(0); + const RectF *pTextureRect = GetTexture()->GetTextureCoordRect(0); float fTexCoords[8] = { diff --git a/stepmania/src/GradeDisplay.cpp b/stepmania/src/GradeDisplay.cpp index 381c82cc2b..c03a99d29d 100644 --- a/stepmania/src/GradeDisplay.cpp +++ b/stepmania/src/GradeDisplay.cpp @@ -74,7 +74,7 @@ void GradeDisplay::Update( float fDeltaTime ) int GradeDisplay::GetFrameIndex( PlayerNumber pn, Grade g ) { - if( this->m_pTexture->GetID().filename.find("_blank") != string::npos ) + if( this->GetTexture()->GetID().filename.find("_blank") != string::npos ) return 0; // either 8, or 16 states @@ -133,7 +133,7 @@ void GradeDisplay::Scroll() int iFrameNo = GetFrameIndex( m_PlayerNumber, m_Grade ); - m_frectDestTexCoords = *m_pTexture->GetTextureCoordRect( iFrameNo ); + m_frectDestTexCoords = *GetTexture()->GetTextureCoordRect( iFrameNo ); m_frectStartTexCoords = m_frectDestTexCoords; m_frectStartTexCoords.top += GRADES_TO_SCROLL * GRADE_FRAME_HEIGHT; m_frectStartTexCoords.bottom += GRADES_TO_SCROLL * GRADE_FRAME_HEIGHT; diff --git a/stepmania/src/Quad.h b/stepmania/src/Quad.h index 4886779281..1b41b6500a 100644 --- a/stepmania/src/Quad.h +++ b/stepmania/src/Quad.h @@ -11,7 +11,7 @@ class Quad : public Sprite public: Quad() { - m_bDrawIfTextureNull = true; + SetDrawIfTextureNull( true ); } void LoadFromNode( const XNode* pNode ); diff --git a/stepmania/src/Sprite.h b/stepmania/src/Sprite.h index cbe238ab4c..c9e6137216 100644 --- a/stepmania/src/Sprite.h +++ b/stepmania/src/Sprite.h @@ -66,6 +66,9 @@ public: virtual void PushSelf( lua_State *L ); protected: + void SetDrawIfTextureNull( bool b ) { m_bDrawIfTextureNull = b; } + +private: void LoadFromTexture( RageTextureID ID ); void LoadStatesFromTexture();