BitmapText copy ctor to fix refcount desync

This commit is contained in:
Glenn Maynard
2005-07-15 03:50:56 +00:00
parent 6d275d4f95
commit ff2c101d82
2 changed files with 18 additions and 0 deletions
+17
View File
@@ -82,6 +82,23 @@ BitmapText::~BitmapText()
FONT->UnloadFont( m_pFont );
}
BitmapText::BitmapText( const BitmapText &cpy ):
Actor( cpy )
{
#define CPY(a) a = cpy.a
CPY( m_sText );
CPY( m_wTextLines );
CPY( m_iLineWidths );
CPY( m_iWrapWidthPixels );
CPY( m_fMaxWidth );
CPY( m_fMaxHeight );
CPY( m_bRainbow );
CPY( m_aVertices );
CPY( m_pTextures );
#undef CPY
m_pFont = FONT->CopyFont( cpy.m_pFont );
}
void BitmapText::LoadFromNode( const CString& sDir, const XNode* pNode )
{