fix difficulty icon placement in reverse course songs

fix global modifiers tweening in
This commit is contained in:
Glenn Maynard
2004-05-26 04:33:07 +00:00
parent 55e06955bc
commit 71df5d0d3c
4 changed files with 9 additions and 6 deletions
+2 -1
View File
@@ -12,11 +12,12 @@ struct Attack
float fSecsRemaining; float fSecsRemaining;
CString sModifier; CString sModifier;
bool bOn; // for GAMESTATE bool bOn; // for GAMESTATE
bool bGlobal; // true for song-wide course mods
void GetAttackBeats( const Song *song, PlayerNumber pn, float &fStartBeat, float &fEndBeat ) const; void GetAttackBeats( const Song *song, PlayerNumber pn, float &fStartBeat, float &fEndBeat ) const;
bool IsBlank() { return sModifier.empty(); } bool IsBlank() { return sModifier.empty(); }
void MakeBlank() { sModifier=""; } void MakeBlank() { sModifier=""; }
Attack() { fStartSecond = -1; bOn = false; } Attack() { fStartSecond = -1; bOn = false; bGlobal = false; }
}; };
typedef vector<Attack> AttackArray; typedef vector<Attack> AttackArray;
+4 -3
View File
@@ -430,9 +430,10 @@ void GameState::Update( float fDelta )
// converted into the current music time. // converted into the current music time.
ASSERT( attack.fStartSecond != -1 ); ASSERT( attack.fStartSecond != -1 );
const bool bCurrentlyEnabled = bool bCurrentlyEnabled =
attack.fStartSecond < this->m_fMusicSeconds && attack.bGlobal ||
m_fMusicSeconds < attack.fStartSecond+attack.fSecsRemaining; ( attack.fStartSecond < this->m_fMusicSeconds &&
m_fMusicSeconds < attack.fStartSecond+attack.fSecsRemaining );
if( m_ActiveAttacks[p][s].bOn == bCurrentlyEnabled ) if( m_ActiveAttacks[p][s].bOn == bCurrentlyEnabled )
continue; /* OK */ continue; /* OK */
+2 -2
View File
@@ -801,7 +801,6 @@ void ScreenGameplay::SetupSong( int p, int iSongIndex )
GAMESTATE->m_ModsToApply[p].clear(); GAMESTATE->m_ModsToApply[p].clear();
for( unsigned i=0; i<m_asModifiersQueue[p][iSongIndex].size(); ++i ) for( unsigned i=0; i<m_asModifiersQueue[p][iSongIndex].size(); ++i )
{ {
/* Hack: Course modifiers that are set to start immediately shouldn't tween on. */
Attack a = m_asModifiersQueue[p][iSongIndex][i]; Attack a = m_asModifiersQueue[p][iSongIndex][i];
if( a.fStartSecond == 0 ) if( a.fStartSecond == 0 )
a.fStartSecond = -1; // now a.fStartSecond = -1; // now
@@ -813,7 +812,8 @@ void ScreenGameplay::SetupSong( int p, int iSongIndex )
/* Update attack bOn flags. */ /* Update attack bOn flags. */
GAMESTATE->Update(0); GAMESTATE->Update(0);
GAMESTATE->RebuildPlayerOptionsFromActiveAttacks( (PlayerNumber)p ); GAMESTATE->RebuildPlayerOptionsFromActiveAttacks( (PlayerNumber)p );
/* Snap. */
/* Hack: Course modifiers that are set to start immediately shouldn't tween on. */
GAMESTATE->m_CurrentPlayerOptions[p] = GAMESTATE->m_PlayerOptions[p]; GAMESTATE->m_CurrentPlayerOptions[p] = GAMESTATE->m_PlayerOptions[p];
NoteData pOriginalNoteData; NoteData pOriginalNoteData;
+1
View File
@@ -24,6 +24,7 @@ void TrailEntry::GetAttackArray( AttackArray &out ) const
a.fSecsRemaining = 10000; /* whole song */ a.fSecsRemaining = 10000; /* whole song */
a.level = ATTACK_LEVEL_1; a.level = ATTACK_LEVEL_1;
a.sModifier = Modifiers; a.sModifier = Modifiers;
a.bGlobal = true;
out.push_back( a ); out.push_back( a );
} }