fix "transform mods that last for a whole song in a course get applied twice"

fix "impossible to get 100% on a course that uses AddMines" by calculating RadarValues after applying mods
Trail::GetRadarValues needs to do caching.  Performance is bad.
This commit is contained in:
Chris Danford
2004-07-23 04:45:48 +00:00
parent 23cedc1b83
commit 27ece3ecbf
11 changed files with 154 additions and 59 deletions
+17
View File
@@ -6,6 +6,7 @@
#include "song.h"
#include "GameState.h"
#include "RadarValues.h"
#include "Foreach.h"
NoteType NoteDataUtil::GetSmallestNoteTypeForMeasure( const NoteData &n, int iMeasureIndex )
{
@@ -1551,6 +1552,22 @@ void NoteDataUtil::ConvertAdditionsToRegular( NoteData &in )
in.SetTapNote(t,r,TAP_TAP);
}
void NoteDataUtil::TransformNoteData( NoteData &nd, const AttackArray &aa, StepsType st, Song* pSong )
{
FOREACH_CONST( Attack, aa, a )
{
PlayerOptions po;
po.FromString( a->sModifier );
if( po.ContainsTransformOrTurn() )
{
float fStartBeat, fEndBeat;
a->GetAttackBeats( pSong, PLAYER_INVALID, fStartBeat, fEndBeat );
NoteDataUtil::TransformNoteData( nd, po, st, fStartBeat, fEndBeat );
}
}
}
void NoteDataUtil::TransformNoteData( NoteData &nd, const PlayerOptions &po, StepsType st, float fStartBeat, float fEndBeat )
{
if( po.m_bTurns[PlayerOptions::TURN_MIRROR] ) NoteDataUtil::Turn( nd, st, NoteDataUtil::mirror, fStartBeat, fEndBeat );