simplify
This commit is contained in:
@@ -166,9 +166,8 @@ bool DWILoader::LoadFromDWITokens(
|
|||||||
else if( sDescription.CompareNoCase("maniac")==0 ) out.SetDifficulty( DIFFICULTY_HARD );
|
else if( sDescription.CompareNoCase("maniac")==0 ) out.SetDifficulty( DIFFICULTY_HARD );
|
||||||
else if( sDescription.CompareNoCase("smaniac")==0 ) out.SetDifficulty( DIFFICULTY_CHALLENGE );
|
else if( sDescription.CompareNoCase("smaniac")==0 ) out.SetDifficulty( DIFFICULTY_CHALLENGE );
|
||||||
|
|
||||||
NoteData* pNoteData = new NoteData;
|
NoteData newNoteData;
|
||||||
ASSERT( pNoteData );
|
newNoteData.SetNumTracks( g_mapDanceNoteToNoteDataColumn.size() );
|
||||||
pNoteData->SetNumTracks( g_mapDanceNoteToNoteDataColumn.size() );
|
|
||||||
|
|
||||||
for( int pad=0; pad<2; pad++ ) // foreach pad
|
for( int pad=0; pad<2; pad++ ) // foreach pad
|
||||||
{
|
{
|
||||||
@@ -256,9 +255,9 @@ bool DWILoader::LoadFromDWITokens(
|
|||||||
DWIcharToNoteCol( c, (GameController)pad, iCol1, iCol2 );
|
DWIcharToNoteCol( c, (GameController)pad, iCol1, iCol2 );
|
||||||
|
|
||||||
if( iCol1 != -1 )
|
if( iCol1 != -1 )
|
||||||
pNoteData->SetTapNote(iCol1, iIndex, TAP_TAP);
|
newNoteData.SetTapNote(iCol1, iIndex, TAP_TAP);
|
||||||
if( iCol2 != -1 )
|
if( iCol2 != -1 )
|
||||||
pNoteData->SetTapNote(iCol2, iIndex, TAP_TAP);
|
newNoteData.SetTapNote(iCol2, iIndex, TAP_TAP);
|
||||||
|
|
||||||
if( sStepData[i] == '!' )
|
if( sStepData[i] == '!' )
|
||||||
{
|
{
|
||||||
@@ -268,9 +267,9 @@ bool DWILoader::LoadFromDWITokens(
|
|||||||
DWIcharToNoteCol( holdChar, (GameController)pad, iCol1, iCol2 );
|
DWIcharToNoteCol( holdChar, (GameController)pad, iCol1, iCol2 );
|
||||||
|
|
||||||
if( iCol1 != -1 )
|
if( iCol1 != -1 )
|
||||||
pNoteData->SetTapNote(iCol1, iIndex, TAP_HOLD_HEAD);
|
newNoteData.SetTapNote(iCol1, iIndex, TAP_HOLD_HEAD);
|
||||||
if( iCol2 != -1 )
|
if( iCol2 != -1 )
|
||||||
pNoteData->SetTapNote(iCol2, iIndex, TAP_HOLD_HEAD);
|
newNoteData.SetTapNote(iCol2, iIndex, TAP_HOLD_HEAD);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -283,13 +282,12 @@ bool DWILoader::LoadFromDWITokens(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// this will expand the HoldNote begin markers we wrote into actual HoldNotes
|
// this will expand the HoldNote begin markers we wrote into actual HoldNotes
|
||||||
pNoteData->Convert2sAnd3sToHoldNotes();
|
newNoteData.Convert2sAnd3sToHoldNotes();
|
||||||
|
|
||||||
ASSERT( pNoteData->GetNumTracks() > 0 );
|
ASSERT( newNoteData.GetNumTracks() > 0 );
|
||||||
|
|
||||||
out.SetNoteData(pNoteData);
|
out.SetNoteData(&newNoteData);
|
||||||
|
|
||||||
delete pNoteData;
|
|
||||||
out.TidyUpData();
|
out.TidyUpData();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user