From 2f6c0d08a72ac045b160b20310e3e15b10101ba7 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 16 Apr 2004 05:41:47 +0000 Subject: [PATCH] auto-hide "_blank"; gameplay hold note test case 44->50FPS since unused hold tails are hidden --- stepmania/src/Sprite.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stepmania/src/Sprite.cpp b/stepmania/src/Sprite.cpp index 92ce8fec9e..fd5c7141d9 100644 --- a/stepmania/src/Sprite.cpp +++ b/stepmania/src/Sprite.cpp @@ -228,6 +228,11 @@ bool Sprite::LoadFromTexture( RageTextureID ID ) ASSERT( m_pTexture != NULL ); + /* Hack: if we load "_blank", mark the actor hidden, so we can short-circuit + * rendering later on. (This helps NoteField rendering.) */ + if( !SetExtension(Basename(ID.filename), "").CompareNoCase("_blank") ) + this->SetHidden( true ); + // the size of the sprite is the size of the image before it was scaled Sprite::m_size.x = (float)m_pTexture->GetSourceFrameWidth(); Sprite::m_size.y = (float)m_pTexture->GetSourceFrameHeight();