make Quad less special. Create a "default" texture object for the

"no texture" properties.  This way, loaded sprites always have a
texture loaded.
This commit is contained in:
Glenn Maynard
2007-02-13 07:39:49 +00:00
parent bf6327ad00
commit c3a0714e4a
9 changed files with 39 additions and 12 deletions
+1 -3
View File
@@ -20,7 +20,6 @@ REGISTER_ACTOR_CLASS( Sprite )
Sprite::Sprite()
{
m_pTexture = NULL;
m_bDrawIfTextureNull = false;
m_iCurState = 0;
m_fSecsIntoState = 0.0f;
m_bUsingCustomTexCoords = false;
@@ -43,7 +42,6 @@ Sprite::Sprite( const Sprite &cpy ):
Actor( cpy )
{
#define CPY(a) a = cpy.a
CPY( m_bDrawIfTextureNull );
CPY( m_States );
CPY( m_iCurState );
CPY( m_fSecsIntoState );
@@ -557,7 +555,7 @@ void Sprite::DrawTexture( const TweenState *state )
bool Sprite::EarlyAbortDraw() const
{
return m_pTexture == NULL && !m_bDrawIfTextureNull;
return m_pTexture == NULL;
}
void Sprite::DrawPrimitives()