Remove unnecessary member. Just set iKeysoundIndex to -1 if it isn't valid.

This commit is contained in:
Steve Checkoway
2006-08-14 10:17:48 +00:00
parent 2f9bda2eea
commit 734f9760cc
7 changed files with 21 additions and 33 deletions
+2 -6
View File
@@ -187,10 +187,7 @@ static void LoadFromSMNoteDataStringWithPlayer( NoteData& out, const RString &sS
p++;
int iKeysoundIndex = 0;
if( 1 == sscanf( p, "%d]", &iKeysoundIndex ) ) // not fatal if this fails due to malformed data
{
tn.bKeysound = true;
tn.iKeysoundIndex = iKeysoundIndex;
}
// skip past the ']'
while( p < endLine )
@@ -386,7 +383,7 @@ void NoteDataUtil::GetSMNoteDataString( const NoteData &in, RString &sRet )
sRet.append( ssprintf("{%s:%.2f}", tn.sAttackModifiers.c_str(),
tn.fAttackDurationSeconds) );
}
if( tn.bKeysound )
if( tn.iKeysoundIndex >= 0 )
sRet.append( ssprintf("[%d]",tn.iKeysoundIndex) );
}
@@ -1962,8 +1959,7 @@ void NoteDataUtil::AddTapAttacks( NoteData &nd, Song* pSong )
TapNote::original,
szAttacks[RandomInt(ARRAYSIZE(szAttacks))],
15.0f,
false,
0 );
-1 );
nd.SetTapNote( iTrack, BeatToNoteRow(fBeat), tn );
}
}