From c682db354e5dbe5834a26c3f6380f3ea773f7bc6 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 12 Jan 2006 19:22:08 +0000 Subject: [PATCH] Removing dynamic note skin change support during courses and battle. - It's very rarely used. - It requires authoring new note skins just to use it, which is too time-consuming for the value of the feature. - Colorblind players may pick a note skin that they can read. The option to do this should always be available, and not overridden by courses, or they're not going to be able to read it. - The code is extremely complicated and ugly, and breaks very often. Spring cleaning in January ... --- stepmania/src/GameState.cpp | 53 +++++-------------------------------- 1 file changed, 7 insertions(+), 46 deletions(-) diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index 7402092b9e..d8fda81ff4 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -1116,45 +1116,17 @@ void GameState::GetAllUsedNoteSkins( vector &out ) const { out.push_back( m_pPlayerState[pn]->m_PlayerOptions.m_sNoteSkin ); - switch( this->m_PlayMode ) - { - case PLAY_MODE_BATTLE: - case PLAY_MODE_RAVE: - for( int al=0; alm_pCurCharacters[pn]; - ASSERT( ch ); - const CString* asAttacks = ch->m_sAttacks[al]; - for( int att = 0; att < NUM_ATTACKS_PER_LEVEL; ++att ) - { - PlayerOptions po; - po.FromString( asAttacks[att] ); - out.push_back( po.m_sNoteSkin ); - } - } - } - /* Add note skins that are used in courses. */ if( this->IsCourseMode() ) { - FOREACH_EnabledPlayer(pn) + const Trail *pTrail = this->m_pCurTrail[pn]; + ASSERT( pTrail ); + + FOREACH_CONST( TrailEntry, pTrail->m_vEntries, e ) { - const Trail *pTrail = this->m_pCurTrail[pn]; - ASSERT( pTrail ); - - FOREACH_CONST( TrailEntry, pTrail->m_vEntries, e ) - { - AttackArray a; - e->GetAttackArray( a ); - - for( unsigned j=0; jModifiers ); + out.push_back( po.m_sNoteSkin ); } } } @@ -1162,17 +1134,6 @@ void GameState::GetAllUsedNoteSkins( vector &out ) const /* Remove duplicates. */ sort( out.begin(), out.end() ); out.erase( unique( out.begin(), out.end() ), out.end() ); - - /* Hack: NoteSkin "default" is never applied as an attack, so don't - * waste memory preloading it. */ - for( unsigned i = 0; i < out.size(); ++i ) - { - if( !out[i].CompareNoCase("default") || out[i] == "" ) - { - out.erase( out.begin()+i, out.begin()+i+1 ); - --i; - } - } } /* From NoteField: */