Enums for TapNoteType, TapNoteSubType, and TapNoteSource
I intend to make additional useful information available on judgments, such as TapNoteType and TapNoteSubType( for hold judgments ). I am submitting this part as a separate pull request because it is more generally applicable to anything TapNote related.
This commit is contained in:
@@ -2404,6 +2404,25 @@
|
||||
<EnumValue name=''TapNoteScoreJudgeType_MinimumScore'' value='0'/>
|
||||
<EnumValue name=''TapNoteScoreJudgeType_LastScore'' value='1'/>
|
||||
</Enum>
|
||||
<Enum name='TapNoteType'>
|
||||
<EnumValue name=''TapNoteType_Empty'' value='0'/>
|
||||
<EnumValue name=''TapNoteType_Tap'' value='1'/>
|
||||
<EnumValue name=''TapNoteType_HoldHead'' value='2'/>
|
||||
<EnumValue name=''TapNoteType_HoldTail'' value='3'/>
|
||||
<EnumValue name=''TapNoteType_Mine'' value='4'/>
|
||||
<EnumValue name=''TapNoteType_Lift'' value='5'/>
|
||||
<EnumValue name=''TapNoteType_Attack'' value='6'/>
|
||||
<EnumValue name=''TapNoteType_AutoKeysound'' value='7'/>
|
||||
<EnumValue name=''TapNoteType_Fake'' value='8'/>
|
||||
</Enum>
|
||||
<Enum name='TapNoteSubType'>
|
||||
<EnumValue name=''TapNoteSubType_Hold'' value='0'/>
|
||||
<EnumValue name=''TapNoteSubType_Roll'' value='1'/>
|
||||
</Enum>
|
||||
<Enum name='TapNoteSource'>
|
||||
<EnumValue name=''TapNoteSource_Original'' value='0'/>
|
||||
<EnumValue name=''TapNoteSource_Addition'' value='1'/>
|
||||
</Enum>
|
||||
<Enum name='TextGlowMode'>
|
||||
<EnumValue name=''TextGlowMode_Inner'' value='0'/>
|
||||
<EnumValue name=''TextGlowMode_Stroke'' value='1'/>
|
||||
|
||||
@@ -88,7 +88,7 @@ void AutoKeysounds::LoadAutoplaySoundsInto( RageSoundReader_Chain *pChain )
|
||||
pn = GetNextEnabledPlayer(pn);
|
||||
while( pn != PLAYER_INVALID )
|
||||
{
|
||||
if( tn[pn].type != TapNote::autoKeysound || tn[pn].iKeysoundIndex != tap.iKeysoundIndex )
|
||||
if( tn[pn].type != TapNoteType_AutoKeysound || tn[pn].iKeysoundIndex != tap.iKeysoundIndex )
|
||||
bSoundIsGlobal = false;
|
||||
pn = GetNextEnabledPlayer(pn);
|
||||
}
|
||||
@@ -99,7 +99,7 @@ void AutoKeysounds::LoadAutoplaySoundsInto( RageSoundReader_Chain *pChain )
|
||||
if( tn[pn] == TAP_EMPTY )
|
||||
continue;
|
||||
|
||||
ASSERT( tn[pn].type == TapNote::autoKeysound );
|
||||
ASSERT( tn[pn].type == TapNoteType_AutoKeysound );
|
||||
if( tn[pn].iKeysoundIndex >= 0 )
|
||||
{
|
||||
RString sKeysoundFilePath = sSongDir + pSong->m_vsKeysoundFile[tn[pn].iKeysoundIndex];
|
||||
@@ -351,7 +351,7 @@ void AutoKeysounds::Update( float fDelta )
|
||||
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( nd, t, r, iRowLastCrossed+1, iRowNow )
|
||||
{
|
||||
const TapNote &tn = nd.GetTapNote( t, r );
|
||||
ASSERT( tn.type == TapNote::autoKeysound );
|
||||
ASSERT( tn.type == TapNoteType_AutoKeysound );
|
||||
if( tn.bKeysound )
|
||||
m_vKeysounds[tn.iKeysoundIndex].Play();
|
||||
}
|
||||
|
||||
@@ -352,7 +352,7 @@ void BeginnerHelper::Update( float fDeltaTime )
|
||||
int iStep = 0;
|
||||
const int iNumTracks = m_NoteData[pn].GetNumTracks();
|
||||
for( int t=0; t<iNumTracks; t++ )
|
||||
if( m_NoteData[pn].GetTapNote(t,iRow).type == TapNote::tap )
|
||||
if( m_NoteData[pn].GetTapNote(t,iRow).type == TapNoteType_Tap )
|
||||
iStep |= 1 << t;
|
||||
|
||||
// Assign new data
|
||||
|
||||
@@ -657,7 +657,7 @@ void GameSoundManager::Update( float fDeltaTime )
|
||||
// Otherwise, for each index we crossed since the last update:
|
||||
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( lights, cl, r, iRowLastCrossed+1, iSongRow+1 )
|
||||
{
|
||||
if( lights.GetTapNote( cl, r ).type != TapNote::empty )
|
||||
if( lights.GetTapNote( cl, r ).type != TapNoteType_Empty )
|
||||
{
|
||||
LIGHTSMAN->BlinkCabinetLight( cl );
|
||||
break;
|
||||
|
||||
@@ -27,8 +27,8 @@ void GhostArrowRow::Load( const PlayerState* pPlayerState, float fYReverseOffset
|
||||
const GameInput GameI = GAMESTATE->GetCurrentStyle()->StyleInputToGameInput( c, pn );
|
||||
NOTESKIN->SetGameController( GameI.controller );
|
||||
|
||||
m_bHoldShowing.push_back( TapNote::SubType_Invalid );
|
||||
m_bLastHoldShowing.push_back( TapNote::SubType_Invalid );
|
||||
m_bHoldShowing.push_back( TapNoteSubType_Invalid );
|
||||
m_bLastHoldShowing.push_back( TapNoteSubType_Invalid );
|
||||
|
||||
m_Ghost.push_back( NOTESKIN->LoadActor(sButton, "Explosion", this) );
|
||||
m_Ghost[c]->SetName( "GhostArrow" );
|
||||
@@ -67,26 +67,26 @@ void GhostArrowRow::Update( float fDeltaTime )
|
||||
{
|
||||
if( m_bLastHoldShowing[i] != m_bHoldShowing[i] )
|
||||
{
|
||||
if( m_bLastHoldShowing[i] == TapNote::hold_head_hold )
|
||||
if( m_bLastHoldShowing[i] == TapNoteSubType_Hold )
|
||||
m_Ghost[i]->PlayCommand( "HoldingOff" );
|
||||
else if( m_bLastHoldShowing[i] == TapNote::hold_head_roll )
|
||||
else if( m_bLastHoldShowing[i] == TapNoteSubType_Roll )
|
||||
m_Ghost[i]->PlayCommand( "RollOff" );
|
||||
/*
|
||||
else if( m_bLastHoldShowing[i] == TapNote::hold_head_mine )
|
||||
else if( m_bLastHoldShowing[i] == TapNoteSubType_Mine )
|
||||
m_Ghost[i]->PlayCommand( "MinefieldOff" );
|
||||
*/
|
||||
|
||||
if( m_bHoldShowing[i] == TapNote::hold_head_hold )
|
||||
if( m_bHoldShowing[i] == TapNoteSubType_Hold )
|
||||
m_Ghost[i]->PlayCommand( "HoldingOn" );
|
||||
else if( m_bHoldShowing[i] == TapNote::hold_head_roll )
|
||||
else if( m_bHoldShowing[i] == TapNoteSubType_Roll )
|
||||
m_Ghost[i]->PlayCommand( "RollOn" );
|
||||
/*
|
||||
else if( m_bHoldShowing[i] == TapNote::hold_head_mine )
|
||||
else if( m_bHoldShowing[i] == TapNoteSubType_Mine )
|
||||
m_Ghost[i]->PlayCommand( "MinefieldOn" );
|
||||
*/
|
||||
m_bLastHoldShowing[i] = m_bHoldShowing[i];
|
||||
}
|
||||
m_bHoldShowing[i] = TapNote::SubType_Invalid;
|
||||
m_bHoldShowing[i] = TapNoteSubType_Invalid;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -25,8 +25,8 @@ protected:
|
||||
const PlayerState* m_pPlayerState;
|
||||
|
||||
vector<Actor *> m_Ghost;
|
||||
vector<TapNote::SubType> m_bHoldShowing;
|
||||
vector<TapNote::SubType> m_bLastHoldShowing;
|
||||
vector<TapNoteSubType> m_bHoldShowing;
|
||||
vector<TapNoteSubType> m_bLastHoldShowing;
|
||||
};
|
||||
|
||||
|
||||
|
||||
+55
-55
@@ -91,7 +91,7 @@ void NoteData::ClearRangeForTrack( int rowBegin, int rowEnd, int iTrack )
|
||||
--prev;
|
||||
TapNote tn = lBegin->second;
|
||||
int iRow = prev->first;
|
||||
if( tn.type == TapNote::hold_head && iRow + tn.iDuration > rowEnd )
|
||||
if( tn.type == TapNoteType_HoldHead && iRow + tn.iDuration > rowEnd )
|
||||
{
|
||||
// A hold note overlaps the end of the range. Separate it.
|
||||
SetTapNote( iTrack, iRow, TAP_EMPTY );
|
||||
@@ -144,10 +144,10 @@ void NoteData::CopyRange( const NoteData& from, int rowFromBegin, int rowFromEnd
|
||||
for( ; lBegin != lEnd; ++lBegin )
|
||||
{
|
||||
TapNote head = lBegin->second;
|
||||
if( head.type == TapNote::empty )
|
||||
if( head.type == TapNoteType_Empty )
|
||||
continue;
|
||||
|
||||
if( head.type == TapNote::hold_head )
|
||||
if( head.type == TapNoteType_HoldHead )
|
||||
{
|
||||
int iStartRow = lBegin->first + iMoveBy;
|
||||
int iEndRow = iStartRow + head.iDuration;
|
||||
@@ -175,7 +175,7 @@ void NoteData::CopyAll( const NoteData& from )
|
||||
bool NoteData::IsRowEmpty( int row ) const
|
||||
{
|
||||
for( int t=0; t<GetNumTracks(); t++ )
|
||||
if( GetTapNote(t, row).type != TapNote::empty )
|
||||
if( GetTapNote(t, row).type != TapNoteType_Empty )
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -185,7 +185,7 @@ bool NoteData::IsRangeEmpty( int track, int rowBegin, int rowEnd ) const
|
||||
ASSERT( track < GetNumTracks() );
|
||||
|
||||
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( *this, track, r, rowBegin, rowEnd )
|
||||
if( GetTapNote(track,r).type != TapNote::empty )
|
||||
if( GetTapNote(track,r).type != TapNoteType_Empty )
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -194,7 +194,7 @@ int NoteData::GetNumTapNonEmptyTracks( int row ) const
|
||||
{
|
||||
int iNum = 0;
|
||||
for( int t=0; t<GetNumTracks(); t++ )
|
||||
if( GetTapNote(t, row).type != TapNote::empty )
|
||||
if( GetTapNote(t, row).type != TapNoteType_Empty )
|
||||
iNum++;
|
||||
return iNum;
|
||||
}
|
||||
@@ -202,7 +202,7 @@ int NoteData::GetNumTapNonEmptyTracks( int row ) const
|
||||
void NoteData::GetTapNonEmptyTracks( int row, set<int>& addTo ) const
|
||||
{
|
||||
for( int t=0; t<GetNumTracks(); t++ )
|
||||
if( GetTapNote(t, row).type != TapNote::empty )
|
||||
if( GetTapNote(t, row).type != TapNoteType_Empty )
|
||||
addTo.insert(t);
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ bool NoteData::GetTapFirstNonEmptyTrack( int row, int &iNonEmptyTrackOut ) const
|
||||
{
|
||||
for( int t=0; t<GetNumTracks(); t++ )
|
||||
{
|
||||
if( GetTapNote( t, row ).type != TapNote::empty )
|
||||
if( GetTapNote( t, row ).type != TapNoteType_Empty )
|
||||
{
|
||||
iNonEmptyTrackOut = t;
|
||||
return true;
|
||||
@@ -223,7 +223,7 @@ bool NoteData::GetTapFirstEmptyTrack( int row, int &iEmptyTrackOut ) const
|
||||
{
|
||||
for( int t=0; t<GetNumTracks(); t++ )
|
||||
{
|
||||
if( GetTapNote( t, row ).type == TapNote::empty )
|
||||
if( GetTapNote( t, row ).type == TapNoteType_Empty )
|
||||
{
|
||||
iEmptyTrackOut = t;
|
||||
return true;
|
||||
@@ -236,7 +236,7 @@ bool NoteData::GetTapLastEmptyTrack( int row, int &iEmptyTrackOut ) const
|
||||
{
|
||||
for( int t=GetNumTracks()-1; t>=0; t-- )
|
||||
{
|
||||
if( GetTapNote( t, row ).type == TapNote::empty )
|
||||
if( GetTapNote( t, row ).type == TapNoteType_Empty )
|
||||
{
|
||||
iEmptyTrackOut = t;
|
||||
return true;
|
||||
@@ -251,7 +251,7 @@ int NoteData::GetNumTracksWithTap( int row ) const
|
||||
for( int t=0; t<GetNumTracks(); t++ )
|
||||
{
|
||||
const TapNote &tn = GetTapNote( t, row );
|
||||
if( tn.type == TapNote::tap || tn.type == TapNote::lift )
|
||||
if( tn.type == TapNoteType_Tap || tn.type == TapNoteType_Lift )
|
||||
iNum++;
|
||||
}
|
||||
return iNum;
|
||||
@@ -263,7 +263,7 @@ int NoteData::GetNumTracksWithTapOrHoldHead( int row ) const
|
||||
for( int t=0; t<GetNumTracks(); t++ )
|
||||
{
|
||||
const TapNote &tn = GetTapNote( t, row );
|
||||
if( tn.type == TapNote::tap || tn.type == TapNote::lift || tn.type == TapNote::hold_head )
|
||||
if( tn.type == TapNoteType_Tap || tn.type == TapNoteType_Lift || tn.type == TapNoteType_HoldHead )
|
||||
iNum++;
|
||||
}
|
||||
return iNum;
|
||||
@@ -274,7 +274,7 @@ int NoteData::GetFirstTrackWithTap( int row ) const
|
||||
for( int t=0; t<GetNumTracks(); t++ )
|
||||
{
|
||||
const TapNote &tn = GetTapNote( t, row );
|
||||
if( tn.type == TapNote::tap || tn.type == TapNote::lift )
|
||||
if( tn.type == TapNoteType_Tap || tn.type == TapNoteType_Lift )
|
||||
return t;
|
||||
}
|
||||
return -1;
|
||||
@@ -285,7 +285,7 @@ int NoteData::GetFirstTrackWithTapOrHoldHead( int row ) const
|
||||
for( int t=0; t<GetNumTracks(); t++ )
|
||||
{
|
||||
const TapNote &tn = GetTapNote( t, row );
|
||||
if( tn.type == TapNote::tap || tn.type == TapNote::lift || tn.type == TapNote::hold_head )
|
||||
if( tn.type == TapNoteType_Tap || tn.type == TapNoteType_Lift || tn.type == TapNoteType_HoldHead )
|
||||
return t;
|
||||
}
|
||||
return -1;
|
||||
@@ -296,7 +296,7 @@ int NoteData::GetLastTrackWithTapOrHoldHead( int row ) const
|
||||
for( int t=GetNumTracks()-1; t>=0; t-- )
|
||||
{
|
||||
const TapNote &tn = GetTapNote( t, row );
|
||||
if( tn.type == TapNote::tap || tn.type == TapNote::lift || tn.type == TapNote::hold_head )
|
||||
if( tn.type == TapNoteType_Tap || tn.type == TapNoteType_Lift || tn.type == TapNoteType_HoldHead )
|
||||
return t;
|
||||
}
|
||||
return -1;
|
||||
@@ -316,7 +316,7 @@ void NoteData::AddHoldNote( int iTrack, int iStartRow, int iEndRow, TapNote tn )
|
||||
{
|
||||
int iOtherRow = it->first;
|
||||
const TapNote &tnOther = it->second;
|
||||
if( tnOther.type == TapNote::hold_head )
|
||||
if( tnOther.type == TapNoteType_HoldHead )
|
||||
{
|
||||
iStartRow = min( iStartRow, iOtherRow );
|
||||
iEndRow = max( iEndRow, iOtherRow + tnOther.iDuration );
|
||||
@@ -349,7 +349,7 @@ void NoteData::AddHoldNote( int iTrack, int iStartRow, int iEndRow, TapNote tn )
|
||||
bool NoteData::IsHoldHeadOrBodyAtRow( int iTrack, int iRow, int *pHeadRow ) const
|
||||
{
|
||||
const TapNote &tn = GetTapNote( iTrack, iRow );
|
||||
if( tn.type == TapNote::hold_head )
|
||||
if( tn.type == TapNoteType_HoldHead )
|
||||
{
|
||||
if( pHeadRow != NULL )
|
||||
*pHeadRow = iRow;
|
||||
@@ -369,7 +369,7 @@ bool NoteData::IsHoldNoteAtRow( int iTrack, int iRow, int *pHeadRow ) const
|
||||
if( pHeadRow == NULL )
|
||||
pHeadRow = &iDummy;
|
||||
|
||||
/* Starting at iRow, search upwards. If we find a TapNote::hold_head, we're within
|
||||
/* Starting at iRow, search upwards. If we find a TapNoteType_HoldHead, we're within
|
||||
* a hold. If we find a tap, mine or attack, we're not--those never lie
|
||||
* within hold notes. Ignore autoKeysound. */
|
||||
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE_REVERSE( *this, iTrack, r, 0, iRow )
|
||||
@@ -377,21 +377,21 @@ bool NoteData::IsHoldNoteAtRow( int iTrack, int iRow, int *pHeadRow ) const
|
||||
const TapNote &tn = GetTapNote( iTrack, r );
|
||||
switch( tn.type )
|
||||
{
|
||||
case TapNote::hold_head:
|
||||
case TapNoteType_HoldHead:
|
||||
if( tn.iDuration + r < iRow )
|
||||
return false;
|
||||
*pHeadRow = r;
|
||||
return true;
|
||||
|
||||
case TapNote::tap:
|
||||
case TapNote::mine:
|
||||
case TapNote::attack:
|
||||
case TapNote::lift:
|
||||
case TapNote::fake:
|
||||
case TapNoteType_Tap:
|
||||
case TapNoteType_Mine:
|
||||
case TapNoteType_Attack:
|
||||
case TapNoteType_Lift:
|
||||
case TapNoteType_Fake:
|
||||
return false;
|
||||
|
||||
case TapNote::empty:
|
||||
case TapNote::autoKeysound:
|
||||
case TapNoteType_Empty:
|
||||
case TapNoteType_AutoKeysound:
|
||||
// ignore
|
||||
continue;
|
||||
DEFAULT_FAIL( tn.type );
|
||||
@@ -450,7 +450,7 @@ int NoteData::GetLastRow() const
|
||||
/* XXX: We might have a hold note near the end with autoplay sounds
|
||||
* after it. Do something else with autoplay sounds ... */
|
||||
const TapNote &tn = GetTapNote( t, iRow );
|
||||
if( tn.type == TapNote::hold_head )
|
||||
if( tn.type == TapNoteType_HoldHead )
|
||||
iRow += tn.iDuration;
|
||||
|
||||
iOldestRowFoundSoFar = max( iOldestRowFoundSoFar, iRow );
|
||||
@@ -461,27 +461,27 @@ int NoteData::GetLastRow() const
|
||||
|
||||
bool NoteData::IsTap(const TapNote &tn, const int row) const
|
||||
{
|
||||
return (tn.type != TapNote::empty && tn.type != TapNote::mine
|
||||
&& tn.type != TapNote::lift && tn.type != TapNote::fake
|
||||
&& tn.type != TapNote::autoKeysound
|
||||
return (tn.type != TapNoteType_Empty && tn.type != TapNoteType_Mine
|
||||
&& tn.type != TapNoteType_Lift && tn.type != TapNoteType_Fake
|
||||
&& tn.type != TapNoteType_AutoKeysound
|
||||
&& GAMESTATE->GetProcessedTimingData()->IsJudgableAtRow(row));
|
||||
}
|
||||
|
||||
bool NoteData::IsMine(const TapNote &tn, const int row) const
|
||||
{
|
||||
return (tn.type == TapNote::mine
|
||||
return (tn.type == TapNoteType_Mine
|
||||
&& GAMESTATE->GetProcessedTimingData()->IsJudgableAtRow(row));
|
||||
}
|
||||
|
||||
bool NoteData::IsLift(const TapNote &tn, const int row) const
|
||||
{
|
||||
return (tn.type == TapNote::lift
|
||||
return (tn.type == TapNoteType_Lift
|
||||
&& GAMESTATE->GetProcessedTimingData()->IsJudgableAtRow(row));
|
||||
}
|
||||
|
||||
bool NoteData::IsFake(const TapNote &tn, const int row) const
|
||||
{
|
||||
return (tn.type == TapNote::fake
|
||||
return (tn.type == TapNoteType_Fake
|
||||
|| !GAMESTATE->GetProcessedTimingData()->IsJudgableAtRow(row));
|
||||
}
|
||||
|
||||
@@ -553,11 +553,11 @@ bool NoteData::RowNeedsAtLeastSimultaneousPresses( int iMinSimultaneousPresses,
|
||||
const TapNote &tn = GetTapNote(t, row);
|
||||
switch( tn.type )
|
||||
{
|
||||
case TapNote::mine:
|
||||
case TapNote::empty:
|
||||
case TapNote::fake:
|
||||
case TapNote::lift: // you don't "press" on a lift.
|
||||
case TapNote::autoKeysound:
|
||||
case TapNoteType_Mine:
|
||||
case TapNoteType_Empty:
|
||||
case TapNoteType_Fake:
|
||||
case TapNoteType_Lift: // you don't "press" on a lift.
|
||||
case TapNoteType_AutoKeysound:
|
||||
continue; // skip these types - they don't count
|
||||
default: break;
|
||||
}
|
||||
@@ -612,10 +612,10 @@ int NoteData::GetNumRowsWithSimultaneousTaps( int iMinTaps, int iStartIndex, int
|
||||
for( int t=0; t<GetNumTracks(); t++ )
|
||||
{
|
||||
const TapNote &tn = GetTapNote(t, r);
|
||||
if (tn.type != TapNote::mine && // mines don't count.
|
||||
tn.type != TapNote::empty &&
|
||||
tn.type != TapNote::fake &&
|
||||
tn.type != TapNote::autoKeysound)
|
||||
if (tn.type != TapNoteType_Mine && // mines don't count.
|
||||
tn.type != TapNoteType_Empty &&
|
||||
tn.type != TapNoteType_Fake &&
|
||||
tn.type != TapNoteType_AutoKeysound)
|
||||
iNumNotesThisIndex++;
|
||||
}
|
||||
if( iNumNotesThisIndex >= iMinTaps )
|
||||
@@ -634,8 +634,8 @@ int NoteData::GetNumHoldNotes( int iStartIndex, int iEndIndex ) const
|
||||
GetTapNoteRangeExclusive( t, iStartIndex, iEndIndex, lBegin, lEnd );
|
||||
for( ; lBegin != lEnd; ++lBegin )
|
||||
{
|
||||
if( lBegin->second.type != TapNote::hold_head ||
|
||||
lBegin->second.subType != TapNote::hold_head_hold )
|
||||
if( lBegin->second.type != TapNoteType_HoldHead ||
|
||||
lBegin->second.subType != TapNoteSubType_Hold )
|
||||
continue;
|
||||
if (!GAMESTATE->GetProcessedTimingData()->IsJudgableAtRow(lBegin->first))
|
||||
continue;
|
||||
@@ -654,8 +654,8 @@ int NoteData::GetNumRolls( int iStartIndex, int iEndIndex ) const
|
||||
GetTapNoteRangeExclusive( t, iStartIndex, iEndIndex, lBegin, lEnd );
|
||||
for( ; lBegin != lEnd; ++lBegin )
|
||||
{
|
||||
if( lBegin->second.type != TapNote::hold_head ||
|
||||
lBegin->second.subType != TapNote::hold_head_roll )
|
||||
if( lBegin->second.type != TapNoteType_HoldHead ||
|
||||
lBegin->second.subType != TapNoteSubType_Roll )
|
||||
continue;
|
||||
if (!GAMESTATE->GetProcessedTimingData()->IsJudgableAtRow(lBegin->first))
|
||||
continue;
|
||||
@@ -773,8 +773,8 @@ pair<int, int> NoteData::GetNumHoldNotesTwoPlayer( int iStartIndex, int iEndInde
|
||||
GetTapNoteRangeExclusive( t, iStartIndex, iEndIndex, lBegin, lEnd );
|
||||
for( ; lBegin != lEnd; ++lBegin )
|
||||
{
|
||||
if( lBegin->second.type != TapNote::hold_head ||
|
||||
lBegin->second.subType != TapNote::hold_head_hold )
|
||||
if( lBegin->second.type != TapNoteType_HoldHead ||
|
||||
lBegin->second.subType != TapNoteSubType_Hold )
|
||||
continue;
|
||||
if (!GAMESTATE->GetProcessedTimingData()->IsJudgableAtRow(lBegin->first))
|
||||
continue;
|
||||
@@ -816,8 +816,8 @@ pair<int, int> NoteData::GetNumRollsTwoPlayer( int iStartIndex, int iEndIndex )
|
||||
GetTapNoteRangeExclusive( t, iStartIndex, iEndIndex, lBegin, lEnd );
|
||||
for( ; lBegin != lEnd; ++lBegin )
|
||||
{
|
||||
if( lBegin->second.type != TapNote::hold_head ||
|
||||
lBegin->second.subType != TapNote::hold_head_roll )
|
||||
if( lBegin->second.type != TapNoteType_HoldHead ||
|
||||
lBegin->second.subType != TapNoteSubType_Roll )
|
||||
continue;
|
||||
if (!GAMESTATE->GetProcessedTimingData()->IsJudgableAtRow(lBegin->first))
|
||||
continue;
|
||||
@@ -880,8 +880,8 @@ int NoteData::GetNumMinefields( int iStartIndex, int iEndIndex ) const
|
||||
GetTapNoteRangeExclusive( t, iStartIndex, iEndIndex, begin, end );
|
||||
for( ; begin != end; ++begin )
|
||||
{
|
||||
if( begin->second.type != TapNote::hold_head ||
|
||||
begin->second.subType != TapNote::hold_head_mine )
|
||||
if( begin->second.type != TapNoteType_HoldHead ||
|
||||
begin->second.subType != TapNoteSubType_mine )
|
||||
continue;
|
||||
iNumMinefields++;
|
||||
}
|
||||
@@ -1033,7 +1033,7 @@ void NoteData::GetTapNoteRangeInclusive( int iTrack, int iStartRow, int iEndRow,
|
||||
iterator prev = Decrement(lBegin);
|
||||
|
||||
const TapNote &tn = prev->second;
|
||||
if( tn.type == TapNote::hold_head )
|
||||
if( tn.type == TapNoteType_HoldHead )
|
||||
{
|
||||
int iHoldStartRow = prev->first;
|
||||
int iHoldEndRow = iHoldStartRow + tn.iDuration;
|
||||
@@ -1052,7 +1052,7 @@ void NoteData::GetTapNoteRangeInclusive( int iTrack, int iStartRow, int iEndRow,
|
||||
// Include the next note if it's a hold and starts on iEndRow.
|
||||
const TapNote &tn = lEnd->second;
|
||||
int iHoldStartRow = lEnd->first;
|
||||
if( tn.type == TapNote::hold_head && iHoldStartRow == iEndRow )
|
||||
if( tn.type == TapNoteType_HoldHead && iHoldStartRow == iEndRow )
|
||||
++lEnd;
|
||||
}
|
||||
}
|
||||
@@ -1066,7 +1066,7 @@ void NoteData::GetTapNoteRangeExclusive( int iTrack, int iStartRow, int iEndRow,
|
||||
{
|
||||
iterator prev = lEnd;
|
||||
--prev;
|
||||
if( prev->second.type == TapNote::hold_head )
|
||||
if( prev->second.type == TapNoteType_HoldHead )
|
||||
{
|
||||
int localStartRow = prev->first;
|
||||
const TapNote &tn = prev->second;
|
||||
|
||||
+92
-92
@@ -181,7 +181,7 @@ static void LoadFromSMNoteDataStringWithPlayer( NoteData& out, const RString &sS
|
||||
float fDurationSeconds = 0;
|
||||
if( sscanf( p, "%255[^:]:%f}", szModifiers, &fDurationSeconds ) == 2 ) // not fatal if this fails due to malformed data
|
||||
{
|
||||
tn.type = TapNote::attack;
|
||||
tn.type = TapNoteType_Attack;
|
||||
tn.sAttackModifiers = szModifiers;
|
||||
tn.fAttackDurationSeconds = fDurationSeconds;
|
||||
}
|
||||
@@ -231,7 +231,7 @@ static void LoadFromSMNoteDataStringWithPlayer( NoteData& out, const RString &sS
|
||||
/* Optimization: if we pass TAP_EMPTY, NoteData will do a search
|
||||
* to remove anything in this position. We know that there's nothing
|
||||
* there, so avoid the search. */
|
||||
if( tn.type != TapNote::empty && ch != '3' )
|
||||
if( tn.type != TapNoteType_Empty && ch != '3' )
|
||||
{
|
||||
tn.pn = pn;
|
||||
out.SetTapNote( iTrack, iIndex, tn );
|
||||
@@ -251,7 +251,7 @@ static void LoadFromSMNoteDataStringWithPlayer( NoteData& out, const RString &sS
|
||||
{
|
||||
NoteData::iterator next = Increment( begin );
|
||||
const TapNote &tn = begin->second;
|
||||
if( tn.type == TapNote::hold_head && tn.iDuration == MAX_NOTE_ROW )
|
||||
if( tn.type == TapNoteType_HoldHead && tn.iDuration == MAX_NOTE_ROW )
|
||||
{
|
||||
int iRow = begin->first;
|
||||
LOG->UserLog( "", "", "While loading .sm/.ssc note data, there was an unmatched 2 at beat %f", NoteRowToBeat(iRow) );
|
||||
@@ -325,11 +325,11 @@ void NoteDataUtil::InsertHoldTails( NoteData &inout )
|
||||
{
|
||||
int iRow = begin->first;
|
||||
const TapNote &tn = begin->second;
|
||||
if( tn.type != TapNote::hold_head )
|
||||
if( tn.type != TapNoteType_HoldHead )
|
||||
continue;
|
||||
|
||||
TapNote tail = tn;
|
||||
tail.type = TapNote::hold_tail;
|
||||
tail.type = TapNoteType_HoldTail;
|
||||
|
||||
/* If iDuration is 0, we'd end up overwriting the head with the tail
|
||||
* (and invalidating our iterator). Empty hold notes aren't valid. */
|
||||
@@ -387,36 +387,36 @@ void NoteDataUtil::GetSMNoteDataString( const NoteData &in, RString &sRet )
|
||||
char c;
|
||||
switch( tn.type )
|
||||
{
|
||||
case TapNote::empty: c = '0'; break;
|
||||
case TapNote::tap: c = '1'; break;
|
||||
case TapNote::hold_head:
|
||||
case TapNoteType_Empty: c = '0'; break;
|
||||
case TapNoteType_Tap: c = '1'; break;
|
||||
case TapNoteType_HoldHead:
|
||||
switch( tn.subType )
|
||||
{
|
||||
case TapNote::hold_head_hold: c = '2'; break;
|
||||
case TapNote::hold_head_roll: c = '4'; break;
|
||||
//case TapNote::hold_head_mine: c = 'N'; break;
|
||||
case TapNoteSubType_Hold: c = '2'; break;
|
||||
case TapNoteSubType_Roll: c = '4'; break;
|
||||
//case TapNoteSubType_Mine: c = 'N'; break;
|
||||
default:
|
||||
FAIL_M(ssprintf("Invalid tap note subtype: %i", tn.subType));
|
||||
}
|
||||
break;
|
||||
case TapNote::hold_tail: c = '3'; break;
|
||||
case TapNote::mine: c = 'M'; break;
|
||||
case TapNote::attack: c = 'A'; break;
|
||||
case TapNote::autoKeysound: c = 'K'; break;
|
||||
case TapNote::lift: c = 'L'; break;
|
||||
case TapNote::fake: c = 'F'; break;
|
||||
case TapNoteType_HoldTail: c = '3'; break;
|
||||
case TapNoteType_Mine: c = 'M'; break;
|
||||
case TapNoteType_Attack: c = 'A'; break;
|
||||
case TapNoteType_AutoKeysound: c = 'K'; break;
|
||||
case TapNoteType_Lift: c = 'L'; break;
|
||||
case TapNoteType_Fake: c = 'F'; break;
|
||||
default:
|
||||
c = '\0';
|
||||
FAIL_M(ssprintf("Invalid tap note type: %i", tn.type));
|
||||
}
|
||||
sRet.append( 1, c );
|
||||
|
||||
if( tn.type == TapNote::attack )
|
||||
if( tn.type == TapNoteType_Attack )
|
||||
{
|
||||
sRet.append( ssprintf("{%s:%.2f}", tn.sAttackModifiers.c_str(),
|
||||
tn.fAttackDurationSeconds) );
|
||||
}
|
||||
// hey maybe if we have TapNote::item we can do things here.
|
||||
// hey maybe if we have TapNoteType_Item we can do things here.
|
||||
if( tn.iKeysoundIndex >= 0 )
|
||||
sRet.append( ssprintf("[%d]",tn.iKeysoundIndex) );
|
||||
}
|
||||
@@ -482,7 +482,7 @@ void NoteDataUtil::CombineCompositeNoteData( NoteData &out, const vector<NoteDat
|
||||
int row = i->first;
|
||||
if( out.IsHoldNoteAtRow(track, i->first) )
|
||||
continue;
|
||||
if( i->second.type == TapNote::hold_head )
|
||||
if( i->second.type == TapNoteType_HoldHead )
|
||||
out.AddHoldNote( track, row, row + i->second.iDuration, i->second );
|
||||
else
|
||||
out.SetTapNote( track, row, i->second );
|
||||
@@ -592,7 +592,7 @@ void PlaceAutoKeysound( NoteData &out, int row, TapNote akTap )
|
||||
|
||||
if( iEmptyTrack != -1 )
|
||||
{
|
||||
akTap.type = TapNote::autoKeysound;
|
||||
akTap.type = TapNoteType_AutoKeysound;
|
||||
out.SetTapNote( iEmptyTrack, iEmptyRow, akTap );
|
||||
}
|
||||
}
|
||||
@@ -623,12 +623,12 @@ void NoteDataUtil::LoadOverlapped( const NoteData &in, NoteData &out, int iNewNu
|
||||
for( int iTrackFrom = 0; iTrackFrom < in.GetNumTracks(); ++iTrackFrom )
|
||||
{
|
||||
const TapNote &tnFrom = in.GetTapNote( iTrackFrom, row );
|
||||
if( tnFrom.type == TapNote::empty || tnFrom.type == TapNote::autoKeysound )
|
||||
if( tnFrom.type == TapNoteType_Empty || tnFrom.type == TapNoteType_AutoKeysound )
|
||||
continue;
|
||||
|
||||
// If this is a hold note, find the end.
|
||||
int iEndIndex = row;
|
||||
if( tnFrom.type == TapNote::hold_head )
|
||||
if( tnFrom.type == TapNoteType_HoldHead )
|
||||
iEndIndex = row + tnFrom.iDuration;
|
||||
|
||||
int &iTrackTo = DestRow[iTrackFrom];
|
||||
@@ -659,7 +659,7 @@ void NoteDataUtil::LoadOverlapped( const NoteData &in, NoteData &out, int iNewNu
|
||||
LastSourceTrack[iTrackTo] = iTrackFrom;
|
||||
LastSourceRow[iTrackTo] = iEndIndex;
|
||||
out.SetTapNote( iTrackTo, row, tnFrom );
|
||||
if( tnFrom.type == TapNote::hold_head )
|
||||
if( tnFrom.type == TapNoteType_HoldHead )
|
||||
{
|
||||
const TapNote &tnTail = in.GetTapNote( iTrackFrom, iEndIndex );
|
||||
out.SetTapNote( iTrackTo, iEndIndex, tnTail );
|
||||
@@ -670,7 +670,7 @@ void NoteDataUtil::LoadOverlapped( const NoteData &in, NoteData &out, int iNewNu
|
||||
for( int iTrackFrom = 0; iTrackFrom < in.GetNumTracks(); ++iTrackFrom )
|
||||
{
|
||||
const TapNote &tnFrom = in.GetTapNote( iTrackFrom, row );
|
||||
if( tnFrom.type != TapNote::autoKeysound )
|
||||
if( tnFrom.type != TapNoteType_AutoKeysound )
|
||||
continue;
|
||||
|
||||
PlaceAutoKeysound( out, row, tnFrom );
|
||||
@@ -685,7 +685,7 @@ int FindLongestOverlappingHoldNoteForAnyTrack( const NoteData &in, int iRow )
|
||||
for( int t=0; t<in.GetNumTracks(); t++ )
|
||||
{
|
||||
const TapNote &tn = in.GetTapNote( t, iRow );
|
||||
if( tn.type == TapNote::hold_head )
|
||||
if( tn.type == TapNoteType_HoldHead )
|
||||
iMaxTailRow = max( iMaxTailRow, iRow + tn.iDuration );
|
||||
}
|
||||
|
||||
@@ -803,10 +803,10 @@ RadarStats CalculateRadarStatsFast( const NoteData &in, RadarStats &out )
|
||||
const TapNote &tn = in.GetTapNote(t, r);
|
||||
switch( tn.type )
|
||||
{
|
||||
case TapNote::mine:
|
||||
case TapNote::empty:
|
||||
case TapNote::fake:
|
||||
case TapNote::autoKeysound:
|
||||
case TapNoteType_Mine:
|
||||
case TapNoteType_Empty:
|
||||
case TapNoteType_Fake:
|
||||
case TapNoteType_AutoKeysound:
|
||||
continue; // skip these types - they don't count
|
||||
default: break;
|
||||
}
|
||||
@@ -821,12 +821,12 @@ RadarStats CalculateRadarStatsFast( const NoteData &in, RadarStats &out )
|
||||
else
|
||||
itr->second++;
|
||||
|
||||
if( tn.type == TapNote::tap || tn.type == TapNote::lift || tn.type == TapNote::hold_head )
|
||||
if( tn.type == TapNoteType_Tap || tn.type == TapNoteType_Lift || tn.type == TapNoteType_HoldHead )
|
||||
{
|
||||
simultaneousMapTapHoldHead[r] = 1;
|
||||
}
|
||||
|
||||
if( tn.type == TapNote::hold_head )
|
||||
if( tn.type == TapNoteType_HoldHead )
|
||||
{
|
||||
int searchStartRow = r + 1;
|
||||
int searchEndRow = r + tn.iDuration;
|
||||
@@ -834,9 +834,9 @@ RadarStats CalculateRadarStatsFast( const NoteData &in, RadarStats &out )
|
||||
{
|
||||
switch( in.GetTapNote(t, rr).type )
|
||||
{
|
||||
case TapNote::mine:
|
||||
case TapNote::empty:
|
||||
case TapNote::fake:
|
||||
case TapNoteType_Mine:
|
||||
case TapNoteType_Empty:
|
||||
case TapNoteType_Fake:
|
||||
continue; // skip these types - they don't count
|
||||
default: break;
|
||||
}
|
||||
@@ -980,10 +980,10 @@ void NoteDataUtil::RemoveHoldNotes( NoteData &in, int iStartIndex, int iEndIndex
|
||||
in.GetTapNoteRangeInclusive( t, iStartIndex, iEndIndex, begin, end );
|
||||
for( ; begin != end; ++begin )
|
||||
{
|
||||
if( begin->second.type != TapNote::hold_head ||
|
||||
begin->second.subType != TapNote::hold_head_hold )
|
||||
if( begin->second.type != TapNoteType_HoldHead ||
|
||||
begin->second.subType != TapNoteSubType_Hold )
|
||||
continue;
|
||||
begin->second.type = TapNote::tap;
|
||||
begin->second.type = TapNoteType_Tap;
|
||||
}
|
||||
}
|
||||
in.RevalidateATIs(vector<int>(), false);
|
||||
@@ -997,10 +997,10 @@ void NoteDataUtil::ChangeRollsToHolds( NoteData &in, int iStartIndex, int iEndIn
|
||||
in.GetTapNoteRangeInclusive( t, iStartIndex, iEndIndex, begin, end );
|
||||
for( ; begin != end; ++begin )
|
||||
{
|
||||
if( begin->second.type != TapNote::hold_head ||
|
||||
begin->second.subType != TapNote::hold_head_roll )
|
||||
if( begin->second.type != TapNoteType_HoldHead ||
|
||||
begin->second.subType != TapNoteSubType_Roll )
|
||||
continue;
|
||||
begin->second.subType = TapNote::hold_head_hold;
|
||||
begin->second.subType = TapNoteSubType_Hold;
|
||||
}
|
||||
}
|
||||
in.RevalidateATIs(vector<int>(), false);
|
||||
@@ -1014,10 +1014,10 @@ void NoteDataUtil::ChangeHoldsToRolls( NoteData &in, int iStartIndex, int iEndIn
|
||||
in.GetTapNoteRangeInclusive( t, iStartIndex, iEndIndex, begin, end );
|
||||
for( ; begin != end; ++begin )
|
||||
{
|
||||
if( begin->second.type != TapNote::hold_head ||
|
||||
begin->second.subType != TapNote::hold_head_hold )
|
||||
if( begin->second.type != TapNoteType_HoldHead ||
|
||||
begin->second.subType != TapNoteSubType_Hold )
|
||||
continue;
|
||||
begin->second.subType = TapNote::hold_head_roll;
|
||||
begin->second.subType = TapNoteSubType_Roll;
|
||||
}
|
||||
}
|
||||
in.RevalidateATIs(vector<int>(), false);
|
||||
@@ -1052,7 +1052,7 @@ void NoteDataUtil::RemoveSimultaneousNotes( NoteData &in, int iMaxSimultaneous,
|
||||
for( int t=0; iTracksToRemove>0 && t<in.GetNumTracks(); t++ )
|
||||
{
|
||||
const TapNote &tn = in.GetTapNote(t,r);
|
||||
if( tn.type == TapNote::tap || tn.type == TapNote::hold_head )
|
||||
if( tn.type == TapNoteType_Tap || tn.type == TapNoteType_HoldHead )
|
||||
{
|
||||
in.SetTapNote( t, r, TAP_EMPTY );
|
||||
iTracksToRemove--;
|
||||
@@ -1077,7 +1077,7 @@ void NoteDataUtil::RemoveQuads( NoteData &inout, int iStartIndex, int iEndIndex
|
||||
RemoveSimultaneousNotes( inout, 3, iStartIndex, iEndIndex );
|
||||
}
|
||||
|
||||
void NoteDataUtil::RemoveSpecificTapNotes( NoteData &inout, TapNote::Type tn, int iStartIndex, int iEndIndex )
|
||||
void NoteDataUtil::RemoveSpecificTapNotes( NoteData &inout, TapNoteType tn, int iStartIndex, int iEndIndex )
|
||||
{
|
||||
for( int t=0; t<inout.GetNumTracks(); t++ )
|
||||
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( inout, t, r, iStartIndex, iEndIndex )
|
||||
@@ -1088,17 +1088,17 @@ void NoteDataUtil::RemoveSpecificTapNotes( NoteData &inout, TapNote::Type tn, in
|
||||
|
||||
void NoteDataUtil::RemoveMines( NoteData &inout, int iStartIndex, int iEndIndex )
|
||||
{
|
||||
RemoveSpecificTapNotes( inout, TapNote::mine, iStartIndex, iEndIndex );
|
||||
RemoveSpecificTapNotes( inout, TapNoteType_Mine, iStartIndex, iEndIndex );
|
||||
}
|
||||
|
||||
void NoteDataUtil::RemoveLifts( NoteData &inout, int iStartIndex, int iEndIndex )
|
||||
{
|
||||
RemoveSpecificTapNotes( inout, TapNote::lift, iStartIndex, iEndIndex );
|
||||
RemoveSpecificTapNotes( inout, TapNoteType_Lift, iStartIndex, iEndIndex );
|
||||
}
|
||||
|
||||
void NoteDataUtil::RemoveFakes( NoteData &inout, int iStartIndex, int iEndIndex )
|
||||
{
|
||||
RemoveSpecificTapNotes( inout, TapNote::fake, iStartIndex, iEndIndex );
|
||||
RemoveSpecificTapNotes( inout, TapNoteType_Fake, iStartIndex, iEndIndex );
|
||||
}
|
||||
|
||||
void NoteDataUtil::RemoveAllButOneTap( NoteData &inout, int row )
|
||||
@@ -1108,7 +1108,7 @@ void NoteDataUtil::RemoveAllButOneTap( NoteData &inout, int row )
|
||||
int track;
|
||||
for( track = 0; track < inout.GetNumTracks(); ++track )
|
||||
{
|
||||
if( inout.GetTapNote(track, row).type == TapNote::tap )
|
||||
if( inout.GetTapNote(track, row).type == TapNoteType_Tap )
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1117,7 +1117,7 @@ void NoteDataUtil::RemoveAllButOneTap( NoteData &inout, int row )
|
||||
for( ; track < inout.GetNumTracks(); ++track )
|
||||
{
|
||||
NoteData::iterator iter = inout.FindTapNote( track, row );
|
||||
if( iter != inout.end(track) && iter->second.type == TapNote::tap )
|
||||
if( iter != inout.end(track) && iter->second.type == TapNoteType_Tap )
|
||||
inout.RemoveTapNote( track, iter );
|
||||
}
|
||||
inout.RevalidateATIs(vector<int>(), false);
|
||||
@@ -1474,16 +1474,16 @@ static void SuperShuffleTaps( NoteData &inout, int iStartIndex, int iEndIndex )
|
||||
const TapNote &tn1 = inout.GetTapNote( t1, r );
|
||||
switch( tn1.type )
|
||||
{
|
||||
case TapNote::empty:
|
||||
case TapNote::hold_head:
|
||||
case TapNote::hold_tail:
|
||||
case TapNote::autoKeysound:
|
||||
case TapNoteType_Empty:
|
||||
case TapNoteType_HoldHead:
|
||||
case TapNoteType_HoldTail:
|
||||
case TapNoteType_AutoKeysound:
|
||||
continue; // skip
|
||||
case TapNote::tap:
|
||||
case TapNote::mine:
|
||||
case TapNote::attack:
|
||||
case TapNote::lift:
|
||||
case TapNote::fake:
|
||||
case TapNoteType_Tap:
|
||||
case TapNoteType_Mine:
|
||||
case TapNoteType_Attack:
|
||||
case TapNoteType_Lift:
|
||||
case TapNoteType_Fake:
|
||||
break; // shuffle this
|
||||
DEFAULT_FAIL( tn1.type );
|
||||
}
|
||||
@@ -1506,16 +1506,16 @@ static void SuperShuffleTaps( NoteData &inout, int iStartIndex, int iEndIndex )
|
||||
const TapNote &tn2 = inout.GetTapNote( t2, r );
|
||||
switch( tn2.type )
|
||||
{
|
||||
case TapNote::hold_head:
|
||||
case TapNote::hold_tail:
|
||||
case TapNote::autoKeysound:
|
||||
case TapNoteType_HoldHead:
|
||||
case TapNoteType_HoldTail:
|
||||
case TapNoteType_AutoKeysound:
|
||||
continue; // don't swap with these
|
||||
case TapNote::empty:
|
||||
case TapNote::tap:
|
||||
case TapNote::mine:
|
||||
case TapNote::attack:
|
||||
case TapNote::lift:
|
||||
case TapNote::fake:
|
||||
case TapNoteType_Empty:
|
||||
case TapNoteType_Tap:
|
||||
case TapNoteType_Mine:
|
||||
case TapNoteType_Attack:
|
||||
case TapNoteType_Lift:
|
||||
case TapNoteType_Fake:
|
||||
break; // ok to swap with this
|
||||
DEFAULT_FAIL( tn2.type );
|
||||
}
|
||||
@@ -1565,7 +1565,7 @@ void NoteDataUtil::Backwards( NoteData &inout )
|
||||
int iRowLater = max_row-r;
|
||||
|
||||
const TapNote &tnEarlier = inout.GetTapNote( t, iRowEarlier );
|
||||
if( tnEarlier.type == TapNote::hold_head )
|
||||
if( tnEarlier.type == TapNoteType_HoldHead )
|
||||
iRowLater -= tnEarlier.iDuration;
|
||||
|
||||
out.SetTapNote( t, iRowLater, tnEarlier );
|
||||
@@ -1651,7 +1651,7 @@ void NoteDataUtil::Wide( NoteData &inout, int iStartIndex, int iEndIndex )
|
||||
iTrackToAdd--;
|
||||
CLAMP( iTrackToAdd, 0, inout.GetNumTracks()-1 );
|
||||
|
||||
if( inout.GetTapNote(iTrackToAdd, i).type != TapNote::empty && inout.GetTapNote(iTrackToAdd, i).type != TapNote::fake )
|
||||
if( inout.GetTapNote(iTrackToAdd, i).type != TapNoteType_Empty && inout.GetTapNote(iTrackToAdd, i).type != TapNoteType_Fake )
|
||||
{
|
||||
iTrackToAdd = (iTrackToAdd+1) % inout.GetNumTracks();
|
||||
}
|
||||
@@ -1850,7 +1850,7 @@ void NoteDataUtil::AddMines( NoteData &inout, int iStartIndex, int iEndIndex )
|
||||
if( iRowCount>=iPlaceEveryRows )
|
||||
{
|
||||
for( int t=0; t<inout.GetNumTracks(); t++ )
|
||||
if( inout.GetTapNote(t,r).type == TapNote::tap )
|
||||
if( inout.GetTapNote(t,r).type == TapNoteType_Tap )
|
||||
inout.SetTapNote(t,r,TAP_ADDITION_MINE);
|
||||
|
||||
iRowCount = 0;
|
||||
@@ -1867,7 +1867,7 @@ void NoteDataUtil::AddMines( NoteData &inout, int iStartIndex, int iEndIndex )
|
||||
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( inout, iTrack, r, iStartIndex, iEndIndex )
|
||||
{
|
||||
const TapNote &tn = inout.GetTapNote( iTrack, r );
|
||||
if( tn.type != TapNote::hold_head )
|
||||
if( tn.type != TapNoteType_HoldHead )
|
||||
continue;
|
||||
|
||||
int iMineRow = r + tn.iDuration + BeatToNoteRow(0.5f);
|
||||
@@ -1885,7 +1885,7 @@ void NoteDataUtil::AddMines( NoteData &inout, int iStartIndex, int iEndIndex )
|
||||
|
||||
// Convert all notes in this row to mines.
|
||||
for( int t=0; t<inout.GetNumTracks(); t++ )
|
||||
if( inout.GetTapNote(t,iMineRow).type == TapNote::tap )
|
||||
if( inout.GetTapNote(t,iMineRow).type == TapNoteType_Tap )
|
||||
inout.SetTapNote(t,iMineRow,TAP_ADDITION_MINE);
|
||||
|
||||
iRowCount = 0;
|
||||
@@ -1972,7 +1972,7 @@ void NoteDataUtil::ConvertTapsToHolds( NoteData &inout, int iSimultaneousHolds,
|
||||
if( iTrackAddedThisRow > iSimultaneousHolds )
|
||||
break;
|
||||
|
||||
if( inout.GetTapNote(t,r).type == TapNote::tap )
|
||||
if( inout.GetTapNote(t,r).type == TapNoteType_Tap )
|
||||
{
|
||||
// Find the ending row for this hold
|
||||
int iTapsLeft = iSimultaneousHolds;
|
||||
@@ -1985,7 +1985,7 @@ void NoteDataUtil::ConvertTapsToHolds( NoteData &inout, int iSimultaneousHolds,
|
||||
|
||||
// If there are two taps in a row on the same track,
|
||||
// don't convert the earlier one to a hold.
|
||||
if( inout.GetTapNote(t,r2).type != TapNote::empty )
|
||||
if( inout.GetTapNote(t,r2).type != TapNoteType_Empty )
|
||||
{
|
||||
addHold = false;
|
||||
break;
|
||||
@@ -2035,7 +2035,7 @@ void NoteDataUtil::Stomp( NoteData &inout, StepsType st, int iStartIndex, int iE
|
||||
|
||||
for( int t=0; t<inout.GetNumTracks(); t++ )
|
||||
{
|
||||
if( inout.GetTapNote(t, r).type == TapNote::tap ) // there is a tap here
|
||||
if( inout.GetTapNote(t, r).type == TapNoteType_Tap ) // there is a tap here
|
||||
{
|
||||
// Look to see if there is enough empty space on either side of the note
|
||||
// to turn this into a jump.
|
||||
@@ -2086,15 +2086,15 @@ void NoteDataUtil::SnapToNearestNoteType( NoteData &inout, NoteType nt1, NoteTyp
|
||||
for( int c=0; c<inout.GetNumTracks(); c++ )
|
||||
{
|
||||
TapNote tnNew = inout.GetTapNote(c, iOldIndex);
|
||||
if( tnNew.type == TapNote::empty )
|
||||
if( tnNew.type == TapNoteType_Empty )
|
||||
continue;
|
||||
|
||||
inout.SetTapNote(c, iOldIndex, TAP_EMPTY);
|
||||
|
||||
if( tnNew.type == TapNote::tap && inout.IsHoldNoteAtRow(c, iNewIndex) )
|
||||
if( tnNew.type == TapNoteType_Tap && inout.IsHoldNoteAtRow(c, iNewIndex) )
|
||||
continue; // HoldNotes override TapNotes
|
||||
|
||||
if( tnNew.type == TapNote::hold_head )
|
||||
if( tnNew.type == TapNoteType_HoldHead )
|
||||
{
|
||||
/* Quantize the duration. If the result is empty, just discard the hold. */
|
||||
tnNew.iDuration = Quantize( tnNew.iDuration, BeatToNoteRow(fSnapInterval1) );
|
||||
@@ -2183,7 +2183,7 @@ void NoteDataUtil::CollapseLeft( NoteData &inout )
|
||||
int iNumTracksFilled = 0;
|
||||
for( int t=0; t<inout.GetNumTracks(); t++ )
|
||||
{
|
||||
if( inout.GetTapNote(t,r).type != TapNote::empty )
|
||||
if( inout.GetTapNote(t,r).type != TapNoteType_Empty )
|
||||
{
|
||||
TapNote tn = inout.GetTapNote(t,r);
|
||||
inout.SetTapNote(t, r, TAP_EMPTY);
|
||||
@@ -2283,7 +2283,7 @@ bool NoteDataUtil::RowPassesValidMask( NoteData &inout, int row, const bool bVal
|
||||
{
|
||||
for( int t=0; t<inout.GetNumTracks(); t++ )
|
||||
{
|
||||
if( !bValidMask[t] && inout.GetTapNote(t,row).type != TapNote::empty )
|
||||
if( !bValidMask[t] && inout.GetTapNote(t,row).type != TapNoteType_Empty )
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2294,10 +2294,10 @@ void NoteDataUtil::ConvertAdditionsToRegular( NoteData &inout )
|
||||
{
|
||||
for( int t=0; t<inout.GetNumTracks(); t++ )
|
||||
FOREACH_NONEMPTY_ROW_IN_TRACK( inout, t, r )
|
||||
if( inout.GetTapNote(t,r).source == TapNote::addition )
|
||||
if( inout.GetTapNote(t,r).source == TapNoteSource_Addition )
|
||||
{
|
||||
TapNote tn = inout.GetTapNote(t,r);
|
||||
tn.source = TapNote::original;
|
||||
tn.source = TapNoteSource_Original;
|
||||
inout.SetTapNote( t, r, tn );
|
||||
}
|
||||
inout.RevalidateATIs(vector<int>(), false);
|
||||
@@ -2389,9 +2389,9 @@ void NoteDataUtil::AddTapAttacks( NoteData &nd, Song* pSong )
|
||||
int iBeat = (int)fBeat;
|
||||
int iTrack = iBeat % nd.GetNumTracks(); // deterministically calculates track
|
||||
TapNote tn(
|
||||
TapNote::attack,
|
||||
TapNote::SubType_Invalid,
|
||||
TapNote::original,
|
||||
TapNoteType_Attack,
|
||||
TapNoteSubType_Invalid,
|
||||
TapNoteSource_Original,
|
||||
szAttacks[RandomInt(ARRAYLEN(szAttacks))],
|
||||
15.0f,
|
||||
-1 );
|
||||
@@ -2483,7 +2483,7 @@ void NoteDataUtil::DeleteRows( NoteData &nd, int iStartIndex, int iRowsToDelete
|
||||
nd.RevalidateATIs(vector<int>(), false);
|
||||
}
|
||||
|
||||
void NoteDataUtil::RemoveAllTapsOfType( NoteData& ndInOut, TapNote::Type typeToRemove )
|
||||
void NoteDataUtil::RemoveAllTapsOfType( NoteData& ndInOut, TapNoteType typeToRemove )
|
||||
{
|
||||
/* Be very careful when deleting the tap notes. Erasing elements from maps using
|
||||
* iterators invalidates only the iterator that is being erased. To that end,
|
||||
@@ -2502,7 +2502,7 @@ void NoteDataUtil::RemoveAllTapsOfType( NoteData& ndInOut, TapNote::Type typeToR
|
||||
ndInOut.RevalidateATIs(vector<int>(), false);
|
||||
}
|
||||
|
||||
void NoteDataUtil::RemoveAllTapsExceptForType( NoteData& ndInOut, TapNote::Type typeToKeep )
|
||||
void NoteDataUtil::RemoveAllTapsExceptForType( NoteData& ndInOut, TapNoteType typeToKeep )
|
||||
{
|
||||
/* Same as in RemoveAllTapsOfType(). */
|
||||
for( int t=0; t<ndInOut.GetNumTracks(); t++ )
|
||||
@@ -2536,8 +2536,8 @@ bool NoteDataUtil::AnyTapsAndHoldsInTrackRange( const NoteData& in, int iTrack,
|
||||
{
|
||||
switch( in.GetTapNote( iTrack, r ).type )
|
||||
{
|
||||
case TapNote::empty:
|
||||
case TapNote::mine:
|
||||
case TapNoteType_Empty:
|
||||
case TapNoteType_Mine:
|
||||
continue;
|
||||
default:
|
||||
return true;
|
||||
@@ -2596,7 +2596,7 @@ bool NoteDataUtil::GetPrevEditorPosition( const NoteData& in, int &rowInOut )
|
||||
continue;
|
||||
|
||||
const TapNote &tn = in.GetTapNote( t, iHeadRow );
|
||||
if( tn.type != TapNote::hold_head )
|
||||
if( tn.type != TapNoteType_HoldHead )
|
||||
continue;
|
||||
|
||||
int iEndRow = iHeadRow + tn.iDuration;
|
||||
|
||||
+3
-3
@@ -90,7 +90,7 @@ namespace NoteDataUtil
|
||||
* @param tn the TapNote Type to remove.
|
||||
* @param iStartIndex the starting point for transforming.
|
||||
* @param iEndIndex the ending point for transforming. */
|
||||
void RemoveSpecificTapNotes( NoteData &inout, TapNote::Type tn, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW );
|
||||
void RemoveSpecificTapNotes( NoteData &inout, TapNoteType tn, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW );
|
||||
/**
|
||||
* @brief Remove all of the mines from the chart.
|
||||
* @param inout the Notedata to be transformed.
|
||||
@@ -187,8 +187,8 @@ namespace NoteDataUtil
|
||||
void InsertRows( NoteData &nd, int iStartIndex, int iRowsToShift );
|
||||
void DeleteRows( NoteData &nd, int iStartIndex, int iRowsToShift );
|
||||
|
||||
void RemoveAllTapsOfType( NoteData& ndInOut, TapNote::Type typeToRemove );
|
||||
void RemoveAllTapsExceptForType( NoteData& ndInOut, TapNote::Type typeToKeep );
|
||||
void RemoveAllTapsOfType( NoteData& ndInOut, TapNoteType typeToRemove );
|
||||
void RemoveAllTapsExceptForType( NoteData& ndInOut, TapNoteType typeToKeep );
|
||||
|
||||
int GetMaxNonEmptyTrack( const NoteData& in );
|
||||
bool AnyTapsAndHoldsInTrackRange( const NoteData& in, int iTrack, int iStart, int iEnd );
|
||||
|
||||
+25
-25
@@ -43,9 +43,9 @@ int GetNumNWithScore( const NoteData &in, TapNoteScore tns, int MinTaps, int iSt
|
||||
return iNumSuccessfulDoubles;
|
||||
}
|
||||
|
||||
int GetNumHoldNotesWithScore( const NoteData &in, TapNote::SubType subType, HoldNoteScore hns )
|
||||
int GetNumHoldNotesWithScore( const NoteData &in, TapNoteSubType subType, HoldNoteScore hns )
|
||||
{
|
||||
ASSERT( subType != TapNote::SubType_Invalid );
|
||||
ASSERT( subType != TapNoteSubType_Invalid );
|
||||
|
||||
int iNumSuccessfulHolds = 0;
|
||||
for( int t=0; t<in.GetNumTracks(); ++t )
|
||||
@@ -56,7 +56,7 @@ int GetNumHoldNotesWithScore( const NoteData &in, TapNote::SubType subType, Hold
|
||||
for( ; begin != end; ++begin )
|
||||
{
|
||||
const TapNote &tn = begin->second;
|
||||
if( tn.type != TapNote::hold_head )
|
||||
if( tn.type != TapNoteType_HoldHead )
|
||||
continue;
|
||||
if( tn.subType != subType )
|
||||
continue;
|
||||
@@ -74,7 +74,7 @@ int GetSuccessfulMines( const NoteData &in, int iStartIndex = 0, int iEndIndex =
|
||||
NoteData::all_tracks_const_iterator iter = in.GetTapNoteRangeAllTracks( iStartIndex, iEndIndex );
|
||||
for( ; !iter.IsAtEnd(); ++iter )
|
||||
{
|
||||
if( iter->type == TapNote::mine && iter->result.tns == TNS_AvoidMine )
|
||||
if( iter->type == TapNoteType_Mine && iter->result.tns == TNS_AvoidMine )
|
||||
++iNumSuccessfulMinesNotes;
|
||||
}
|
||||
return iNumSuccessfulMinesNotes;
|
||||
@@ -93,11 +93,11 @@ int GetSuccessfulHands( const NoteData &in, int iStartIndex = 0, int iEndIndex =
|
||||
for( int t=0; t<in.GetNumTracks(); t++ )
|
||||
{
|
||||
const TapNote &tn = in.GetTapNote(t, i);
|
||||
if( tn.type == TapNote::empty )
|
||||
if( tn.type == TapNoteType_Empty )
|
||||
continue;
|
||||
if( tn.type == TapNote::mine ) // mines don't count
|
||||
if( tn.type == TapNoteType_Mine ) // mines don't count
|
||||
continue;
|
||||
if (tn.type == TapNote::fake ) // fake arrows don't count
|
||||
if (tn.type == TapNoteType_Fake ) // fake arrows don't count
|
||||
continue;
|
||||
if( tn.result.tns <= TNS_W5 )
|
||||
Missed = true;
|
||||
@@ -136,7 +136,7 @@ int GetSuccessfulLifts( const NoteData &in, TapNoteScore tns, int iStartIndex =
|
||||
NoteData::all_tracks_const_iterator iter = in.GetTapNoteRangeAllTracks( iStartIndex, iEndIndex );
|
||||
for( ; !iter.IsAtEnd(); ++iter )
|
||||
{
|
||||
if( iter->type == TapNote::lift && iter->result.tns >= tns )
|
||||
if( iter->type == TapNoteType_Lift && iter->result.tns >= tns )
|
||||
++iNumSuccessfulLiftNotes;
|
||||
}
|
||||
return iNumSuccessfulLiftNotes;
|
||||
@@ -153,10 +153,10 @@ int LastTapNoteScoreTrack( const NoteData &in, unsigned iRow, PlayerNumber pn )
|
||||
{
|
||||
/* Skip empty tracks and mines */
|
||||
const TapNote &tn = in.GetTapNote( t, iRow );
|
||||
if (tn.type == TapNote::empty ||
|
||||
tn.type == TapNote::mine ||
|
||||
tn.type == TapNote::fake ||
|
||||
tn.type == TapNote::autoKeysound)
|
||||
if (tn.type == TapNoteType_Empty ||
|
||||
tn.type == TapNoteType_Mine ||
|
||||
tn.type == TapNoteType_Fake ||
|
||||
tn.type == TapNoteType_AutoKeysound)
|
||||
continue;
|
||||
if( tn.pn != PLAYER_INVALID && tn.pn != pn && pn != PLAYER_INVALID )
|
||||
continue;
|
||||
@@ -190,10 +190,10 @@ int MinTapNoteScoreTrack( const NoteData &in, unsigned iRow, PlayerNumber pn )
|
||||
{
|
||||
// Skip empty tracks and mines
|
||||
const TapNote &tn = in.GetTapNote( t, iRow );
|
||||
if (tn.type == TapNote::empty ||
|
||||
tn.type == TapNote::mine ||
|
||||
tn.type == TapNote::fake ||
|
||||
tn.type == TapNote::autoKeysound)
|
||||
if (tn.type == TapNoteType_Empty ||
|
||||
tn.type == TapNoteType_Mine ||
|
||||
tn.type == TapNoteType_Fake ||
|
||||
tn.type == TapNoteType_AutoKeysound)
|
||||
continue;
|
||||
if( tn.pn != PLAYER_INVALID && tn.pn != pn && pn != PLAYER_INVALID )
|
||||
continue;
|
||||
@@ -256,10 +256,10 @@ TapNoteScore NoteDataWithScoring::MinTapNoteScore( const NoteData &in, unsigned
|
||||
{
|
||||
// Ignore mines (and fake arrows), or the score will always be TNS_None.
|
||||
const TapNote &tn = in.GetTapNote( t, row );
|
||||
if (tn.type == TapNote::empty ||
|
||||
tn.type == TapNote::mine ||
|
||||
tn.type == TapNote::fake ||
|
||||
tn.type == TapNote::autoKeysound ||
|
||||
if (tn.type == TapNoteType_Empty ||
|
||||
tn.type == TapNoteType_Mine ||
|
||||
tn.type == TapNoteType_Fake ||
|
||||
tn.type == TapNoteType_AutoKeysound ||
|
||||
( plnum != PlayerNumber_Invalid && tn.pn != plnum ) )
|
||||
continue;
|
||||
score = min( score, tn.result.tns );
|
||||
@@ -332,8 +332,8 @@ float GetActualFreezeRadarValue( const NoteData &in, float fSongSeconds )
|
||||
return 1.0f;
|
||||
|
||||
const int ActualHolds =
|
||||
GetNumHoldNotesWithScore( in, TapNote::hold_head_hold, HNS_Held ) +
|
||||
GetNumHoldNotesWithScore( in, TapNote::hold_head_roll, HNS_Held );
|
||||
GetNumHoldNotesWithScore( in, TapNoteSubType_Hold, HNS_Held ) +
|
||||
GetNumHoldNotesWithScore( in, TapNoteSubType_Roll, HNS_Held );
|
||||
return clamp( float(ActualHolds) / iTotalHolds, 0.0f, 1.0f );
|
||||
}
|
||||
|
||||
@@ -355,13 +355,13 @@ void NoteDataWithScoring::GetActualRadarValues( const NoteData &in, const Player
|
||||
case RadarCategory_Chaos: out[rc] = GetActualChaosRadarValue( in, fSongSeconds, pss ); break;
|
||||
case RadarCategory_TapsAndHolds: out[rc] = (float) GetNumNWithScore( in, TNS_W4, 1 ); break;
|
||||
case RadarCategory_Jumps: out[rc] = (float) GetNumNWithScore( in, TNS_W4, 2 ); break;
|
||||
case RadarCategory_Holds: out[rc] = (float) GetNumHoldNotesWithScore( in, TapNote::hold_head_hold, HNS_Held ); break;
|
||||
case RadarCategory_Holds: out[rc] = (float) GetNumHoldNotesWithScore( in, TapNoteSubType_Hold, HNS_Held ); break;
|
||||
case RadarCategory_Mines: out[rc] = (float) GetSuccessfulMines( in ); break;
|
||||
case RadarCategory_Hands: out[rc] = (float) GetSuccessfulHands( in ); break;
|
||||
case RadarCategory_Rolls: out[rc] = (float) GetNumHoldNotesWithScore( in, TapNote::hold_head_roll, HNS_Held ); break;
|
||||
case RadarCategory_Rolls: out[rc] = (float) GetNumHoldNotesWithScore( in, TapNoteSubType_Roll, HNS_Held ); break;
|
||||
case RadarCategory_Lifts: out[rc] = (float) GetSuccessfulLifts( in, MIN_SCORE_TO_MAINTAIN_COMBO ); break;
|
||||
case RadarCategory_Fakes: out[rc] = (float) in.GetNumFakes(); break;
|
||||
//case RadarCategory_Minefields: out[rc] = (float) GetNumMinefieldsWithScore( in, TapNote::hold_head_mine, HNS_Held ); break;
|
||||
//case RadarCategory_Minefields: out[rc] = (float) GetNumMinefieldsWithScore( in, TapNoteSubType_Mine, HNS_Held ); break;
|
||||
DEFAULT_FAIL( rc );
|
||||
}
|
||||
}
|
||||
|
||||
+20
-20
@@ -519,24 +519,24 @@ void NoteDisplay::DrawHoldBody( const TapNote& tn, int iCol, float fBeat, bool b
|
||||
float fDrawDistanceAfterTargetsPixels, float fDrawDistanceBeforeTargetsPixels, float fFadeInPercentOfDrawFar )
|
||||
{
|
||||
vector<Sprite*> vpSprTop;
|
||||
Sprite *pSpriteTop = GetHoldSprite( m_HoldTopCap, NotePart_HoldTopCap, fBeat, tn.subType == TapNote::hold_head_roll, bIsBeingHeld && !cache->m_bHoldActiveIsAddLayer );
|
||||
Sprite *pSpriteTop = GetHoldSprite( m_HoldTopCap, NotePart_HoldTopCap, fBeat, tn.subType == TapNoteSubType_Roll, bIsBeingHeld && !cache->m_bHoldActiveIsAddLayer );
|
||||
vpSprTop.push_back( pSpriteTop );
|
||||
|
||||
vector<Sprite*> vpSprBody;
|
||||
Sprite *pSpriteBody = GetHoldSprite( m_HoldBody, NotePart_HoldBody, fBeat, tn.subType == TapNote::hold_head_roll, bIsBeingHeld && !cache->m_bHoldActiveIsAddLayer );
|
||||
Sprite *pSpriteBody = GetHoldSprite( m_HoldBody, NotePart_HoldBody, fBeat, tn.subType == TapNoteSubType_Roll, bIsBeingHeld && !cache->m_bHoldActiveIsAddLayer );
|
||||
vpSprBody.push_back( pSpriteBody );
|
||||
|
||||
vector<Sprite*> vpSprBottom;
|
||||
Sprite *pSpriteBottom = GetHoldSprite( m_HoldBottomCap, NotePart_HoldBottomCap, fBeat, tn.subType == TapNote::hold_head_roll, bIsBeingHeld && !cache->m_bHoldActiveIsAddLayer );
|
||||
Sprite *pSpriteBottom = GetHoldSprite( m_HoldBottomCap, NotePart_HoldBottomCap, fBeat, tn.subType == TapNoteSubType_Roll, bIsBeingHeld && !cache->m_bHoldActiveIsAddLayer );
|
||||
vpSprBottom.push_back( pSpriteBottom );
|
||||
|
||||
if( bIsBeingHeld && cache->m_bHoldActiveIsAddLayer )
|
||||
{
|
||||
Sprite *pSprTop = GetHoldSprite( m_HoldTopCap, NotePart_HoldTopCap, fBeat, tn.subType == TapNote::hold_head_roll, true );
|
||||
Sprite *pSprTop = GetHoldSprite( m_HoldTopCap, NotePart_HoldTopCap, fBeat, tn.subType == TapNoteSubType_Roll, true );
|
||||
vpSprTop.push_back( pSprTop );
|
||||
Sprite *pSprBody = GetHoldSprite( m_HoldBody, NotePart_HoldBody, fBeat, tn.subType == TapNote::hold_head_roll, true );
|
||||
Sprite *pSprBody = GetHoldSprite( m_HoldBody, NotePart_HoldBody, fBeat, tn.subType == TapNoteSubType_Roll, true );
|
||||
vpSprBody.push_back( pSprBody );
|
||||
Sprite *pSprBottom = GetHoldSprite( m_HoldBottomCap, NotePart_HoldBottomCap, fBeat, tn.subType == TapNote::hold_head_roll, true );
|
||||
Sprite *pSprBottom = GetHoldSprite( m_HoldBottomCap, NotePart_HoldBottomCap, fBeat, tn.subType == TapNoteSubType_Roll, true );
|
||||
vpSprBottom.push_back( pSprBottom );
|
||||
}
|
||||
|
||||
@@ -659,12 +659,12 @@ void NoteDisplay::DrawHold( const TapNote &tn, int iCol, int iRow, bool bIsBeing
|
||||
/*
|
||||
if( !cache->m_bHoldHeadIsAboveWavyParts )
|
||||
{
|
||||
Actor *pActor = GetHoldActor( m_HoldHead, NotePart_HoldHead, NoteRowToBeat(iRow), tn.subType == TapNote::hold_head_roll, bIsBeingHeld );
|
||||
Actor *pActor = GetHoldActor( m_HoldHead, NotePart_HoldHead, NoteRowToBeat(iRow), tn.subType == TapNoteSubType_Roll, bIsBeingHeld );
|
||||
DrawActor( tn, pActor, NotePart_HoldHead, iCol, bFlipHeadAndTail ? fEndYOffset : fStartYOffset, fBeat, bIsAddition, fPercentFadeToFail, fReverseOffsetPixels, fColorScale, fDrawDistanceAfterTargetsPixels, fDrawDistanceBeforeTargetsPixels, fFadeInPercentOfDrawFar );
|
||||
}
|
||||
if( !cache->m_bHoldTailIsAboveWavyParts )
|
||||
{
|
||||
Actor *pActor = GetHoldActor( m_HoldTail, NotePart_HoldTail, NoteRowToBeat(iRow), tn.subType == TapNote::hold_head_roll, bIsBeingHeld );
|
||||
Actor *pActor = GetHoldActor( m_HoldTail, NotePart_HoldTail, NoteRowToBeat(iRow), tn.subType == TapNoteSubType_Roll, bIsBeingHeld );
|
||||
DrawActor( tn, pActor, NotePart_HoldTail, iCol, bFlipHeadAndTail ? fStartYOffset : fEndYOffset, fBeat, bIsAddition, fPercentFadeToFail, fReverseOffsetPixels, fColorScale, fDrawDistanceAfterTargetsPixels, fDrawDistanceBeforeTargetsPixels, fFadeInPercentOfDrawFar );
|
||||
}
|
||||
*/
|
||||
@@ -677,19 +677,19 @@ void NoteDisplay::DrawHold( const TapNote &tn, int iCol, int iRow, bool bIsBeing
|
||||
// of the head and tail. Perhaps make this a theme/noteskin metric? -aj
|
||||
if( cache->m_bHoldTailIsAboveWavyParts )
|
||||
{
|
||||
Actor *pActor = GetHoldActor( m_HoldTail, NotePart_HoldTail, NoteRowToBeat(iRow), tn.subType == TapNote::hold_head_roll, bIsBeingHeld );
|
||||
Actor *pActor = GetHoldActor( m_HoldTail, NotePart_HoldTail, NoteRowToBeat(iRow), tn.subType == TapNoteSubType_Roll, bIsBeingHeld );
|
||||
DrawActor( tn, pActor, NotePart_HoldTail, iCol, bFlipHeadAndTail ? fStartYOffset : fEndYOffset, fBeat, bIsAddition, fPercentFadeToFail, fReverseOffsetPixels, fColorScale, fDrawDistanceAfterTargetsPixels, fDrawDistanceBeforeTargetsPixels, fFadeInPercentOfDrawFar );
|
||||
}
|
||||
if( cache->m_bHoldHeadIsAboveWavyParts )
|
||||
{
|
||||
Actor *pActor = GetHoldActor( m_HoldHead, NotePart_HoldHead, NoteRowToBeat(iRow), tn.subType == TapNote::hold_head_roll, bIsBeingHeld );
|
||||
Actor *pActor = GetHoldActor( m_HoldHead, NotePart_HoldHead, NoteRowToBeat(iRow), tn.subType == TapNoteSubType_Roll, bIsBeingHeld );
|
||||
DrawActor( tn, pActor, NotePart_HoldHead, iCol, bFlipHeadAndTail ? fEndYOffset : fStartYOffset, fBeat, bIsAddition, fPercentFadeToFail, fReverseOffsetPixels, fColorScale, fDrawDistanceAfterTargetsPixels, fDrawDistanceBeforeTargetsPixels, fFadeInPercentOfDrawFar );
|
||||
}
|
||||
}
|
||||
|
||||
void NoteDisplay::DrawActor( const TapNote& tn, Actor* pActor, NotePart part, int iCol, float fYOffset, float fBeat, bool bIsAddition, float fPercentFadeToFail, float fReverseOffsetPixels, float fColorScale, float fDrawDistanceAfterTargetsPixels, float fDrawDistanceBeforeTargetsPixels, float fFadeInPercentOfDrawFar )
|
||||
{
|
||||
if (tn.type == TapNote::autoKeysound && !GAMESTATE->m_bInStepEditor) return;
|
||||
if (tn.type == TapNoteType_AutoKeysound && !GAMESTATE->m_bInStepEditor) return;
|
||||
if( fYOffset < fDrawDistanceAfterTargetsPixels || fYOffset > fDrawDistanceBeforeTargetsPixels )
|
||||
return;
|
||||
const float fY = ArrowEffects::GetYPos( m_pPlayerState, iCol, fYOffset, fReverseOffsetPixels );
|
||||
@@ -702,8 +702,8 @@ void NoteDisplay::DrawActor( const TapNote& tn, Actor* pActor, NotePart part, in
|
||||
float fRotationX = 0, fRotationZ = 0;
|
||||
const float fRotationY = ArrowEffects::GetRotationY( m_pPlayerState, fYOffset );
|
||||
|
||||
bool bIsHoldHead = tn.type == tn.hold_head;
|
||||
bool bIsHoldCap = bIsHoldHead || tn.type == tn.hold_tail;
|
||||
bool bIsHoldHead = tn.type == TapNoteType_HoldHead;
|
||||
bool bIsHoldCap = bIsHoldHead || tn.type == TapNoteType_HoldTail;
|
||||
|
||||
fRotationZ = ArrowEffects::GetRotationZ( m_pPlayerState, fBeat, bIsHoldHead );
|
||||
if( !bIsHoldCap )
|
||||
@@ -711,7 +711,7 @@ void NoteDisplay::DrawActor( const TapNote& tn, Actor* pActor, NotePart part, in
|
||||
fRotationX = ArrowEffects::GetRotationX( m_pPlayerState, fYOffset );
|
||||
}
|
||||
|
||||
if( tn.type != tn.hold_head )
|
||||
if( tn.type != TapNoteType_HoldHead )
|
||||
fColorScale *= ArrowEffects::GetBrightness( m_pPlayerState, fBeat );
|
||||
|
||||
pActor->SetRotationX( fRotationX );
|
||||
@@ -752,23 +752,23 @@ void NoteDisplay::DrawTap(const TapNote& tn, int iCol, float fBeat,
|
||||
Actor* pActor = NULL;
|
||||
NotePart part = NotePart_Tap;
|
||||
/*
|
||||
if( tn.source == TapNote::addition )
|
||||
if( tn.source == TapNoteSource_Addition )
|
||||
{
|
||||
pActor = GetTapActor( m_TapAddition, NotePart_Addition, fBeat );
|
||||
part = NotePart_Addition;
|
||||
}
|
||||
*/
|
||||
if( tn.type == TapNote::lift )
|
||||
if( tn.type == TapNoteType_Lift )
|
||||
{
|
||||
pActor = GetTapActor( m_TapLift, NotePart_Lift, fBeat );
|
||||
part = NotePart_Lift;
|
||||
}
|
||||
else if( tn.type == TapNote::mine )
|
||||
else if( tn.type == TapNoteType_Mine )
|
||||
{
|
||||
pActor = GetTapActor( m_TapMine, NotePart_Mine, fBeat );
|
||||
part = NotePart_Mine;
|
||||
}
|
||||
else if( tn.type == TapNote::fake )
|
||||
else if( tn.type == TapNoteType_Fake )
|
||||
{
|
||||
pActor = GetTapActor( m_TapFake, NotePart_Fake, fBeat );
|
||||
part = NotePart_Fake;
|
||||
@@ -812,7 +812,7 @@ void NoteDisplay::DrawTap(const TapNote& tn, int iCol, float fBeat,
|
||||
pActor = GetTapActor( m_TapNote, NotePart_Tap, fBeat );
|
||||
}
|
||||
|
||||
if( tn.type == TapNote::attack )
|
||||
if( tn.type == TapNoteType_Attack )
|
||||
{
|
||||
Message msg( "SetAttack" );
|
||||
msg.SetParam( "Modifiers", tn.sAttackModifiers );
|
||||
@@ -823,7 +823,7 @@ void NoteDisplay::DrawTap(const TapNote& tn, int iCol, float fBeat,
|
||||
// this is the line that forces the (1,1,1,x) part of the noteskin diffuse -aj
|
||||
DrawActor( tn, pActor, part, iCol, fYOffset, fBeat, bIsAddition, fPercentFadeToFail, fReverseOffsetPixels, 1.0f, fDrawDistanceAfterTargetsPixels, fDrawDistanceBeforeTargetsPixels, fFadeInPercentOfDrawFar );
|
||||
|
||||
if( tn.type == TapNote::attack )
|
||||
if( tn.type == TapNoteType_Attack )
|
||||
pActor->PlayCommand( "UnsetAttack" );
|
||||
}
|
||||
|
||||
|
||||
+10
-10
@@ -1214,7 +1214,7 @@ void NoteField::DrawPrimitives()
|
||||
for( ; begin != end; ++begin )
|
||||
{
|
||||
const TapNote &tn = begin->second; //m_pNoteData->GetTapNote(c, j);
|
||||
if( tn.type != TapNote::hold_head )
|
||||
if( tn.type != TapNoteType_HoldHead )
|
||||
continue; // skip
|
||||
|
||||
const HoldNoteResult &Result = tn.HoldResult;
|
||||
@@ -1243,7 +1243,7 @@ void NoteField::DrawPrimitives()
|
||||
continue; // skip
|
||||
}
|
||||
|
||||
bool bIsAddition = (tn.source == TapNote::addition);
|
||||
bool bIsAddition = (tn.source == TapNoteSource_Addition);
|
||||
bool bIsHopoPossible = (tn.bHopoPossible);
|
||||
bool bUseAdditionColoring = bIsAddition || bIsHopoPossible;
|
||||
const bool bHoldGhostShowing = tn.HoldResult.bActive && tn.HoldResult.fLife > 0;
|
||||
@@ -1280,13 +1280,13 @@ void NoteField::DrawPrimitives()
|
||||
// Fixes hold head overlapping issue, but not the rolls.
|
||||
switch( tn.type )
|
||||
{
|
||||
case TapNote::empty: // no note here
|
||||
case TapNoteType_Empty: // no note here
|
||||
{
|
||||
continue;
|
||||
}
|
||||
case TapNote::hold_head:
|
||||
case TapNoteType_HoldHead:
|
||||
{
|
||||
//if (tn.subType == TapNote::hold_head_roll)
|
||||
//if (tn.subType == TapNoteSubType_Roll)
|
||||
continue; // skip
|
||||
}
|
||||
default: break;
|
||||
@@ -1313,8 +1313,8 @@ void NoteField::DrawPrimitives()
|
||||
for( int c2=0; c2<m_pNoteData->GetNumTracks(); c2++ )
|
||||
{
|
||||
const TapNote &tmp = m_pNoteData->GetTapNote(c2, q);
|
||||
if(tmp.type == TapNote::hold_head &&
|
||||
tmp.subType == TapNote::hold_head_hold)
|
||||
if(tmp.type == TapNoteType_HoldHead &&
|
||||
tmp.subType == TapNoteSubType_Hold)
|
||||
{
|
||||
bHoldNoteBeginsOnThisBeat = true;
|
||||
break;
|
||||
@@ -1329,8 +1329,8 @@ void NoteField::DrawPrimitives()
|
||||
for( int c2=0; c2<m_pNoteData->GetNumTracks(); c2++ )
|
||||
{
|
||||
const TapNote &tmp = m_pNoteData->GetTapNote(c2, q);
|
||||
if(tmp.type == TapNote::hold_head &&
|
||||
tmp.subType == TapNote::hold_head_roll)
|
||||
if(tmp.type == TapNoteType_HoldHead &&
|
||||
tmp.subType == TapNoteSubType_Roll)
|
||||
{
|
||||
bRollNoteBeginsOnThisBeat = true;
|
||||
break;
|
||||
@@ -1342,7 +1342,7 @@ void NoteField::DrawPrimitives()
|
||||
if( m_iBeginMarker!=-1 && m_iEndMarker!=-1 )
|
||||
bIsInSelectionRange = m_iBeginMarker<=q && q<m_iEndMarker;
|
||||
|
||||
bool bIsAddition = (tn.source == TapNote::addition);
|
||||
bool bIsAddition = (tn.source == TapNoteSource_Addition);
|
||||
bool bIsHopoPossible = (tn.bHopoPossible);
|
||||
bool bUseAdditionColoring = bIsAddition || bIsHopoPossible;
|
||||
NoteDisplayCols *displayCols = tn.pn == PLAYER_INVALID ? m_pCurDisplay : m_pDisplays[tn.pn];
|
||||
|
||||
+45
-12
@@ -5,18 +5,51 @@
|
||||
#include "XmlFile.h"
|
||||
#include "LocalizedString.h"
|
||||
|
||||
TapNote TAP_EMPTY ( TapNote::empty, TapNote::SubType_Invalid, TapNote::original, "", 0, -1 );
|
||||
TapNote TAP_ORIGINAL_TAP ( TapNote::tap, TapNote::SubType_Invalid, TapNote::original, "", 0, -1 );
|
||||
TapNote TAP_ORIGINAL_LIFT ( TapNote::lift, TapNote::SubType_Invalid, TapNote::original, "", 0, -1 );
|
||||
TapNote TAP_ORIGINAL_HOLD_HEAD ( TapNote::hold_head, TapNote::hold_head_hold, TapNote::original, "", 0, -1 );
|
||||
TapNote TAP_ORIGINAL_ROLL_HEAD ( TapNote::hold_head, TapNote::hold_head_roll, TapNote::original, "", 0, -1 );
|
||||
TapNote TAP_ORIGINAL_MINE ( TapNote::mine, TapNote::SubType_Invalid, TapNote::original, "", 0, -1 );
|
||||
TapNote TAP_ORIGINAL_ATTACK ( TapNote::attack, TapNote::SubType_Invalid, TapNote::original, "", 0, -1 );
|
||||
TapNote TAP_ORIGINAL_AUTO_KEYSOUND ( TapNote::autoKeysound,TapNote::SubType_Invalid, TapNote::original, "", 0, -1 );
|
||||
TapNote TAP_ORIGINAL_FAKE ( TapNote::fake, TapNote::SubType_Invalid, TapNote::original, "", 0, -1 );
|
||||
//TapNote TAP_ORIGINAL_MINE_HEAD ( TapNote::mine_head, TapNote::hold_head_mine, TapNote::original, "", 0, -1 );
|
||||
TapNote TAP_ADDITION_TAP ( TapNote::tap, TapNote::SubType_Invalid, TapNote::addition, "", 0, -1 );
|
||||
TapNote TAP_ADDITION_MINE ( TapNote::mine, TapNote::SubType_Invalid, TapNote::addition, "", 0, -1 );
|
||||
TapNote TAP_EMPTY ( TapNoteType_Empty, TapNoteSubType_Invalid, TapNoteSource_Original, "", 0, -1 );
|
||||
TapNote TAP_ORIGINAL_TAP ( TapNoteType_Tap, TapNoteSubType_Invalid, TapNoteSource_Original, "", 0, -1 );
|
||||
TapNote TAP_ORIGINAL_LIFT ( TapNoteType_Lift, TapNoteSubType_Invalid, TapNoteSource_Original, "", 0, -1 );
|
||||
TapNote TAP_ORIGINAL_HOLD_HEAD ( TapNoteType_HoldHead, TapNoteSubType_Hold, TapNoteSource_Original, "", 0, -1 );
|
||||
TapNote TAP_ORIGINAL_ROLL_HEAD ( TapNoteType_HoldHead, TapNoteSubType_Roll, TapNoteSource_Original, "", 0, -1 );
|
||||
TapNote TAP_ORIGINAL_MINE ( TapNoteType_Mine, TapNoteSubType_Invalid, TapNoteSource_Original, "", 0, -1 );
|
||||
TapNote TAP_ORIGINAL_ATTACK ( TapNoteType_Attack, TapNoteSubType_Invalid, TapNoteSource_Original, "", 0, -1 );
|
||||
TapNote TAP_ORIGINAL_AUTO_KEYSOUND ( TapNoteType_AutoKeysound,TapNoteSubType_Invalid, TapNoteSource_Original, "", 0, -1 );
|
||||
TapNote TAP_ORIGINAL_FAKE ( TapNoteType_Fake, TapNoteSubType_Invalid, TapNoteSource_Original, "", 0, -1 );
|
||||
//TapNote TAP_ORIGINAL_MINE_HEAD ( TapNoteType_HoldHead, TapNoteSubType_Mine, TapNoteSource_Original, "", 0, -1 );
|
||||
TapNote TAP_ADDITION_TAP ( TapNoteType_Tap, TapNoteSubType_Invalid, TapNoteSource_Addition, "", 0, -1 );
|
||||
TapNote TAP_ADDITION_MINE ( TapNoteType_Mine, TapNoteSubType_Invalid, TapNoteSource_Addition, "", 0, -1 );
|
||||
|
||||
|
||||
static const char *TapNoteTypeNames[] = {
|
||||
"Empty",
|
||||
"Tap",
|
||||
"HoldHead",
|
||||
"HoldTail",
|
||||
"Mine",
|
||||
"Lift",
|
||||
"Attack",
|
||||
"AutoKeySound",
|
||||
"Fake",
|
||||
};
|
||||
XToString( TapNoteType );
|
||||
XToLocalizedString( TapNoteType );
|
||||
LuaXType( TapNoteType );
|
||||
|
||||
static const char *TapNoteSubTypeNames[] = {
|
||||
"Hold",
|
||||
"Roll",
|
||||
//"Mine",
|
||||
};
|
||||
XToString( TapNoteSubType );
|
||||
XToLocalizedString( TapNoteSubType );
|
||||
LuaXType( TapNoteSubType );
|
||||
|
||||
static const char *TapNoteSourceNames[] = {
|
||||
"Original",
|
||||
"Addition",
|
||||
};
|
||||
XToString( TapNoteSource );
|
||||
XToLocalizedString( TapNoteSource );
|
||||
LuaXType( TapNoteSource );
|
||||
|
||||
static const char *NoteTypeNames[] = {
|
||||
"4th",
|
||||
|
||||
+59
-76
@@ -75,43 +75,59 @@ struct HoldNoteResult
|
||||
void LoadFromNode( const XNode* pNode );
|
||||
};
|
||||
|
||||
/** @brief What is the TapNote's core type? */
|
||||
enum TapNoteType
|
||||
{
|
||||
TapNoteType_Empty, /**< There is no note here. */
|
||||
TapNoteType_Tap, /**< The player simply steps on this. */
|
||||
TapNoteType_HoldHead, /**< This is graded like the Tap type, but should be held. */
|
||||
TapNoteType_HoldTail, /**< In 2sand3s mode, holds are deleted and hold_tail is added. */
|
||||
TapNoteType_Mine, /**< In most modes, it is suggested to not step on these mines. */
|
||||
TapNoteType_Lift, /**< Lift your foot up when it crosses the target area. */
|
||||
TapNoteType_Attack, /**< Hitting this note causes an attack to take place. */
|
||||
TapNoteType_AutoKeysound, /**< A special sound is played when this note crosses the target area. */
|
||||
TapNoteType_Fake, /**< This arrow can't be scored for or against the player. */
|
||||
NUM_TapNoteType,
|
||||
TapNoteType_Invalid
|
||||
};
|
||||
const RString& TapNoteTypeToString( TapNoteType tnt );
|
||||
const RString& TapNoteTypeToLocalizedString( TapNoteType tnt );
|
||||
LuaDeclareType( TapNoteType );
|
||||
|
||||
/** @brief The list of a TapNote's sub types. */
|
||||
enum TapNoteSubType
|
||||
{
|
||||
TapNoteSubType_Hold, /**< The start of a traditional hold note. */
|
||||
TapNoteSubType_Roll, /**< The start of a roll note that must be hit repeatedly. */
|
||||
//TapNoteSubType_Mine,
|
||||
NUM_TapNoteSubType,
|
||||
TapNoteSubType_Invalid
|
||||
};
|
||||
const RString& TapNoteSubTypeToString( TapNoteSubType tnst );
|
||||
const RString& TapNoteSubTypeToLocalizedString( TapNoteSubType tnst );
|
||||
LuaDeclareType( TapNoteSubType );
|
||||
|
||||
/** @brief The different places a TapNote could come from. */
|
||||
enum TapNoteSource
|
||||
{
|
||||
TapNoteSource_Original, /**< This note is part of the original NoteData. */
|
||||
TapNoteSource_Addition, /**< This note is additional note added by a transform. */
|
||||
NUM_TapNoteSource,
|
||||
TapNoteSource_Invalid
|
||||
};
|
||||
const RString& TapNoteSourceToString( TapNoteSource tns );
|
||||
const RString& TapNoteSourceToLocalizedString( TapNoteSource tns );
|
||||
LuaDeclareType( TapNoteSource );
|
||||
|
||||
/** @brief The various properties of a tap note. */
|
||||
struct TapNote
|
||||
{
|
||||
/** @brief What is the TapNote's core type? */
|
||||
enum Type
|
||||
{
|
||||
empty, /**< There is no note here. */
|
||||
tap, /**< The player simply steps on this. */
|
||||
hold_head, /**< This is graded like the Tap type, but should be held. */
|
||||
hold_tail, /**< In 2sand3s mode, holds are deleted and hold_tail is added. */
|
||||
mine, /**< In most modes, it is suggested to not step on these mines. */
|
||||
lift, /**< Lift your foot up when it crosses the target area. */
|
||||
attack, /**< Hitting this note causes an attack to take place. */
|
||||
autoKeysound, /**< A special sound is played when this note crosses the target area. */
|
||||
fake, /**< This arrow can't be scored for or against the player. */
|
||||
};
|
||||
/** @brief The list of a TapNote's sub types. */
|
||||
enum SubType
|
||||
{
|
||||
hold_head_hold, /**< The start of a traditional hold note. */
|
||||
hold_head_roll, /**< The start of a roll note that must be hit repeatedly. */
|
||||
//hold_head_mine,
|
||||
NUM_SubType,
|
||||
SubType_Invalid
|
||||
};
|
||||
/** @brief The different places a TapNote could come from. */
|
||||
enum Source
|
||||
{
|
||||
original, /**< This note is part of the original NoteData. */
|
||||
addition, /**< This note is additional note added by a transform. */
|
||||
};
|
||||
/** @brief The core note type that is about to cross the target area. */
|
||||
Type type;
|
||||
TapNoteType type;
|
||||
/** @brief The sub type of the note. This is only used if the type is hold_head. */
|
||||
SubType subType;
|
||||
TapNoteSubType subType;
|
||||
/** @brief The originating source of the TapNote. */
|
||||
Source source;
|
||||
TapNoteSource source;
|
||||
/** @brief The result of hitting or missing the TapNote. */
|
||||
TapNoteResult result;
|
||||
/** @brief The Player that is supposed to hit this note. This is mainly for Routine Mode. */
|
||||
@@ -134,15 +150,15 @@ struct TapNote
|
||||
XNode* CreateNode() const;
|
||||
void LoadFromNode( const XNode* pNode );
|
||||
|
||||
TapNote(): type(empty), subType(SubType_Invalid), source(original),
|
||||
result(), pn(PLAYER_INVALID), bHopoPossible(false),
|
||||
sAttackModifiers(""), fAttackDurationSeconds(0),
|
||||
TapNote(): type(TapNoteType_Empty), subType(TapNoteSubType_Invalid),
|
||||
source(TapNoteSource_Original), result(), pn(PLAYER_INVALID),
|
||||
bHopoPossible(false), sAttackModifiers(""), fAttackDurationSeconds(0),
|
||||
iKeysoundIndex(-1), iDuration(0), HoldResult() {}
|
||||
void Init()
|
||||
{
|
||||
type = empty;
|
||||
subType = SubType_Invalid;
|
||||
source = original;
|
||||
type = TapNoteType_Empty;
|
||||
subType = TapNoteSubType_Invalid;
|
||||
source = TapNoteSource_Original;
|
||||
pn = PLAYER_INVALID,
|
||||
bHopoPossible = false;
|
||||
fAttackDurationSeconds = 0.f;
|
||||
@@ -150,9 +166,9 @@ struct TapNote
|
||||
iDuration = 0;
|
||||
}
|
||||
TapNote(
|
||||
Type type_,
|
||||
SubType subType_,
|
||||
Source source_,
|
||||
TapNoteType type_,
|
||||
TapNoteSubType subType_,
|
||||
TapNoteSource source_,
|
||||
RString sAttackModifiers_,
|
||||
float fAttackDurationSeconds_,
|
||||
int iKeysoundIndex_ ):
|
||||
@@ -162,10 +178,10 @@ struct TapNote
|
||||
fAttackDurationSeconds(fAttackDurationSeconds_),
|
||||
iKeysoundIndex(iKeysoundIndex_), iDuration(0), HoldResult()
|
||||
{
|
||||
if (type_ > TapNote::fake )
|
||||
if (type_ > TapNoteType_Fake )
|
||||
{
|
||||
LOG->Trace("Invalid tap note type %d (most likely) due to random vanish issues. Assume it doesn't need judging.", (int)type_ );
|
||||
type = TapNote::empty;
|
||||
LOG->Trace("Invalid tap note type %d (most likely) due to random vanish issues. Assume it doesn't need judging.", TapNoteTypeToString(type_).c_str() );
|
||||
type = TapNoteType_Empty;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,39 +223,6 @@ extern TapNote TAP_ORIGINAL_FAKE; // 'F'
|
||||
extern TapNote TAP_ADDITION_TAP;
|
||||
extern TapNote TAP_ADDITION_MINE;
|
||||
|
||||
/**
|
||||
* @brief Retrieve the string representing the TapNote Type.
|
||||
*
|
||||
* TODO: Find a way to standardize this with the other enum string calls.
|
||||
* @param tn the TapNote's type.
|
||||
* @return the intended string. */
|
||||
inline const RString TapNoteTypeToString( TapNote::Type tn )
|
||||
{
|
||||
switch( tn )
|
||||
{
|
||||
case TapNote::empty:
|
||||
return RString("empty");
|
||||
case TapNote::tap:
|
||||
return RString("tap");
|
||||
case TapNote::hold_head:
|
||||
return RString("hold_head");
|
||||
case TapNote::hold_tail:
|
||||
return RString("hold_tail");
|
||||
case TapNote::mine:
|
||||
return RString("mine");
|
||||
case TapNote::lift:
|
||||
return RString("lift");
|
||||
case TapNote::attack:
|
||||
return RString("attack");
|
||||
case TapNote::autoKeysound:
|
||||
return RString("autoKeysound");
|
||||
case TapNote::fake:
|
||||
return RString("fake");
|
||||
default:
|
||||
return RString("");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief The number of tracks allowed.
|
||||
*
|
||||
|
||||
@@ -942,8 +942,8 @@ bool BMSChartReader::ReadNoteData()
|
||||
{
|
||||
// this object is the end of the hold note.
|
||||
TapNote tn = nd.GetTapNote(track, holdStart[track]);
|
||||
tn.type = TapNote::hold_head;
|
||||
tn.subType = TapNote::hold_head_hold;
|
||||
tn.type = TapNoteType_HoldHead;
|
||||
tn.subType = TapNoteSubType_Hold;
|
||||
nd.AddHoldNote( track, holdStart[track], row, tn );
|
||||
holdStart[track] = -1;
|
||||
lastNote[track] = -1;
|
||||
@@ -953,8 +953,8 @@ bool BMSChartReader::ReadNoteData()
|
||||
// this object is the end of the hold note.
|
||||
// lnobj: set last note to hold head.
|
||||
TapNote tn = nd.GetTapNote(track, lastNote[track]);
|
||||
tn.type = TapNote::hold_head;
|
||||
tn.subType = TapNote::hold_head_hold;
|
||||
tn.type = TapNoteType_HoldHead;
|
||||
tn.subType = TapNoteSubType_Hold;
|
||||
nd.AddHoldNote( track, lastNote[track], row, tn );
|
||||
holdStart[track] = -1;
|
||||
lastNote[track] = -1;
|
||||
|
||||
@@ -367,7 +367,7 @@ static NoteData ParseNoteData(RString &step1, RString &step2,
|
||||
FOREACH_NONEMPTY_ROW_IN_TRACK( newNoteData, t, iHeadRow )
|
||||
{
|
||||
TapNote tn = newNoteData.GetTapNote( t, iHeadRow );
|
||||
if( tn.type != TapNote::hold_head )
|
||||
if( tn.type != TapNoteType_HoldHead )
|
||||
continue;
|
||||
|
||||
int iTailRow = iHeadRow;
|
||||
@@ -375,9 +375,9 @@ static NoteData ParseNoteData(RString &step1, RString &step2,
|
||||
while( !bFound && newNoteData.GetNextTapNoteRowForTrack(t, iTailRow) )
|
||||
{
|
||||
const TapNote &TailTap = newNoteData.GetTapNote( t, iTailRow );
|
||||
if( TailTap.type == TapNote::empty )
|
||||
if( TailTap.type == TapNoteType_Empty )
|
||||
continue;
|
||||
|
||||
|
||||
newNoteData.SetTapNote( t, iTailRow, TAP_EMPTY );
|
||||
tn.iDuration = iTailRow - iHeadRow;
|
||||
newNoteData.SetTapNote( t, iHeadRow, tn );
|
||||
|
||||
@@ -89,11 +89,11 @@ static void Deserialize(BackgroundChange &o, const Json::Value &root )
|
||||
|
||||
static void Deserialize( TapNote &o, const Json::Value &root )
|
||||
{
|
||||
//if( o.type != TapNote::tap )
|
||||
//if( o.type != TapNoteType_Tap )
|
||||
if( root.isInt() )
|
||||
o.type = (TapNote::Type)root["Type"].asInt();
|
||||
//if( o.type == TapNote::hold_head )
|
||||
o.subType = (TapNote::SubType)root["SubType"].asInt();
|
||||
o.type = (TapNoteType)root["Type"].asInt();
|
||||
//if( o.type == TapNoteType_HoldHead )
|
||||
o.subType = (TapNoteSubType)root["SubType"].asInt();
|
||||
//root["Source"] = (int)source;
|
||||
//if( !o.sAttackModifiers.empty() )
|
||||
o.sAttackModifiers = root["AttackModifiers"].asString();
|
||||
|
||||
@@ -123,13 +123,13 @@ static RString NotesToDWIString( const TapNote tnCols[6] )
|
||||
{
|
||||
switch( tnCols[col].type )
|
||||
{
|
||||
case TapNote::empty:
|
||||
case TapNote::mine:
|
||||
case TapNoteType_Empty:
|
||||
case TapNoteType_Mine:
|
||||
continue;
|
||||
default: break;
|
||||
}
|
||||
|
||||
if( tnCols[col].type == TapNote::hold_head )
|
||||
if( tnCols[col].type == TapNoteType_HoldHead )
|
||||
holds += dirs[col];
|
||||
else
|
||||
taps += dirs[col];
|
||||
|
||||
@@ -55,9 +55,9 @@ static void Serialize( const TapNote &o, Json::Value &root )
|
||||
{
|
||||
root = Json::Value(Json::objectValue);
|
||||
|
||||
if( o.type != TapNote::tap )
|
||||
if( o.type != TapNoteType_Tap )
|
||||
root["Type"] = (int)o.type;
|
||||
if( o.type == TapNote::hold_head )
|
||||
if( o.type == TapNoteType_HoldHead )
|
||||
root["SubType"] = (int)o.subType;
|
||||
//root["Source"] = (int)source;
|
||||
if( !o.sAttackModifiers.empty() )
|
||||
|
||||
+70
-70
@@ -537,16 +537,16 @@ static bool NeedsTapJudging( const TapNote &tn )
|
||||
switch( tn.type )
|
||||
{
|
||||
DEFAULT_FAIL( tn.type );
|
||||
case TapNote::tap:
|
||||
case TapNote::hold_head:
|
||||
case TapNote::mine:
|
||||
case TapNote::lift:
|
||||
case TapNoteType_Tap:
|
||||
case TapNoteType_HoldHead:
|
||||
case TapNoteType_Mine:
|
||||
case TapNoteType_Lift:
|
||||
return tn.result.tns == TNS_None;
|
||||
case TapNote::hold_tail:
|
||||
case TapNote::attack:
|
||||
case TapNote::autoKeysound:
|
||||
case TapNote::fake:
|
||||
case TapNote::empty:
|
||||
case TapNoteType_HoldTail:
|
||||
case TapNoteType_Attack:
|
||||
case TapNoteType_AutoKeysound:
|
||||
case TapNoteType_Fake:
|
||||
case TapNoteType_Empty:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -560,16 +560,16 @@ static bool NeedsHoldJudging( const TapNote &tn )
|
||||
switch( tn.type )
|
||||
{
|
||||
DEFAULT_FAIL( tn.type );
|
||||
case TapNote::hold_head:
|
||||
case TapNoteType_HoldHead:
|
||||
return tn.HoldResult.hns == HNS_None;
|
||||
case TapNote::tap:
|
||||
case TapNote::hold_tail:
|
||||
case TapNote::mine:
|
||||
case TapNote::lift:
|
||||
case TapNote::attack:
|
||||
case TapNote::autoKeysound:
|
||||
case TapNote::fake:
|
||||
case TapNote::empty:
|
||||
case TapNoteType_Tap:
|
||||
case TapNoteType_HoldTail:
|
||||
case TapNoteType_Mine:
|
||||
case TapNoteType_Lift:
|
||||
case TapNoteType_Attack:
|
||||
case TapNoteType_AutoKeysound:
|
||||
case TapNoteType_Fake:
|
||||
case TapNoteType_Empty:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -947,7 +947,7 @@ void Player::Update( float fDeltaTime )
|
||||
iHeadRow = iSongRow;
|
||||
|
||||
const TapNote &tn = m_NoteData.GetTapNote( iTrack, iHeadRow );
|
||||
if( tn.type != TapNote::hold_head || tn.subType != TapNote::hold_head_roll )
|
||||
if( tn.type != TapNoteType_HoldHead || tn.subType != TapNoteSubType_Roll )
|
||||
continue;
|
||||
if( tn.HoldResult.hns != HNS_None )
|
||||
continue;
|
||||
@@ -981,7 +981,7 @@ void Player::Update( float fDeltaTime )
|
||||
for( ; !iter.IsAtEnd() && iter.Row() <= iSongRow; ++iter )
|
||||
{
|
||||
TapNote &tn = *iter;
|
||||
if( tn.type != TapNote::hold_head )
|
||||
if( tn.type != TapNoteType_HoldHead )
|
||||
continue;
|
||||
|
||||
int iTrack = iter.Track();
|
||||
@@ -994,9 +994,9 @@ void Player::Update( float fDeltaTime )
|
||||
switch( tn.subType )
|
||||
{
|
||||
DEFAULT_FAIL( tn.subType );
|
||||
case TapNote::hold_head_hold:
|
||||
case TapNoteSubType_Hold:
|
||||
break;
|
||||
case TapNote::hold_head_roll:
|
||||
case TapNoteSubType_Roll:
|
||||
{
|
||||
vector<TrackRowTapNote> v;
|
||||
v.push_back( trtn );
|
||||
@@ -1005,7 +1005,7 @@ void Player::Update( float fDeltaTime )
|
||||
continue; // don't process this below
|
||||
}
|
||||
/*
|
||||
case TapNote::hold_head_mine:
|
||||
case TapNoteSubType_Mine:
|
||||
break;
|
||||
*/
|
||||
|
||||
@@ -1088,14 +1088,14 @@ void Player::UpdateHoldNotes( int iSongRow, float fDeltaTime, vector<TrackRowTap
|
||||
int iMaxEndRow = INT_MIN;
|
||||
int iFirstTrackWithMaxEndRow = -1;
|
||||
|
||||
TapNote::SubType subType = TapNote::SubType_Invalid;
|
||||
TapNoteSubType subType = TapNoteSubType_Invalid;
|
||||
FOREACH( TrackRowTapNote, vTN, trtn )
|
||||
{
|
||||
int iTrack = trtn->iTrack;
|
||||
ASSERT( iStartRow == trtn->iRow );
|
||||
TapNote &tn = *trtn->pTN;
|
||||
int iEndRow = iStartRow + tn.iDuration;
|
||||
if( subType == TapNote::SubType_Invalid )
|
||||
if( subType == TapNoteSubType_Invalid )
|
||||
subType = tn.subType;
|
||||
|
||||
/* All holds must be of the same subType because fLife is handled
|
||||
@@ -1250,7 +1250,7 @@ void Player::UpdateHoldNotes( int iSongRow, float fDeltaTime, vector<TrackRowTap
|
||||
{
|
||||
switch( subType )
|
||||
{
|
||||
case TapNote::hold_head_hold:
|
||||
case TapNoteSubType_Hold:
|
||||
FOREACH( TrackRowTapNote, vTN, trtn )
|
||||
{
|
||||
TapNote &tn = *trtn->pTN;
|
||||
@@ -1296,7 +1296,7 @@ void Player::UpdateHoldNotes( int iSongRow, float fDeltaTime, vector<TrackRowTap
|
||||
}
|
||||
}
|
||||
break;
|
||||
case TapNote::hold_head_roll:
|
||||
case TapNoteSubType_Roll:
|
||||
FOREACH( TrackRowTapNote, vTN, trtn )
|
||||
{
|
||||
TapNote &tn = *trtn->pTN;
|
||||
@@ -1311,7 +1311,7 @@ void Player::UpdateHoldNotes( int iSongRow, float fDeltaTime, vector<TrackRowTap
|
||||
fLife = max( fLife, 0 ); // clamp
|
||||
break;
|
||||
/*
|
||||
case TapNote::hold_head_mine:
|
||||
case TapNoteSubType_Mine:
|
||||
break;
|
||||
*/
|
||||
default:
|
||||
@@ -1353,14 +1353,14 @@ void Player::UpdateHoldNotes( int iSongRow, float fDeltaTime, vector<TrackRowTap
|
||||
switch( subType )
|
||||
{
|
||||
DEFAULT_FAIL( subType );
|
||||
case TapNote::hold_head_hold:
|
||||
case TapNoteSubType_Hold:
|
||||
bAllowHoldCheckpoints = true;
|
||||
break;
|
||||
case TapNote::hold_head_roll:
|
||||
case TapNoteSubType_Roll:
|
||||
bAllowHoldCheckpoints = false;
|
||||
break;
|
||||
/*
|
||||
case TapNote::hold_head_mine:
|
||||
case TapNoteSubType_Mine:
|
||||
bAllowHoldCheckpoints = true;
|
||||
break;
|
||||
*/
|
||||
@@ -1454,7 +1454,7 @@ void Player::UpdateHoldNotes( int iSongRow, float fDeltaTime, vector<TrackRowTap
|
||||
|
||||
if( tn.iKeysoundIndex >= 0 && tn.iKeysoundIndex < (int) m_vKeysounds.size() )
|
||||
{
|
||||
float factor = (tn.subType == TapNote::hold_head_roll ? 2.0f * fLifeFraction : 10.0f * fLifeFraction - 8.5f);
|
||||
float factor = (tn.subType == TapNoteSubType_Roll ? 2.0f * fLifeFraction : 10.0f * fLifeFraction - 8.5f);
|
||||
m_vKeysounds[tn.iKeysoundIndex].SetProperty ("Volume", max(0.0f, min(1.0f, factor)) * fVol);
|
||||
}
|
||||
}
|
||||
@@ -1667,7 +1667,7 @@ int Player::GetClosestNoteDirectional( int col, int iStartRow, int iEndRow, bool
|
||||
if (!m_Timing->IsJudgableAtRow( begin->first ))
|
||||
break;
|
||||
// unsure if autoKeysounds should be excluded. -Wolfman2000
|
||||
if( tn.type == TapNote::empty || tn.type == TapNote::autoKeysound )
|
||||
if( tn.type == TapNoteType_Empty || tn.type == TapNoteType_AutoKeysound )
|
||||
break;
|
||||
if( !bAllowGraded && tn.result.tns != TNS_None )
|
||||
break;
|
||||
@@ -1974,7 +1974,7 @@ void Player::PlayKeysound( const TapNote &tn, TapNoteScore score )
|
||||
if( tn.iKeysoundIndex >= 0 && tn.iKeysoundIndex < (int) m_vKeysounds.size() )
|
||||
{
|
||||
// handle a case for hold notes
|
||||
if( tn.type == TapNote::hold_head )
|
||||
if( tn.type == TapNoteType_HoldHead )
|
||||
{
|
||||
// if the hold is not already held
|
||||
if( tn.HoldResult.hns == HNS_None )
|
||||
@@ -2046,15 +2046,15 @@ void Player::StepStrumHopo( int col, int row, const RageTimer &tm, bool bHeld, b
|
||||
for( ; begin != end; ++begin )
|
||||
{
|
||||
TapNote &tn = begin->second;
|
||||
if( tn.type != TapNote::hold_head )
|
||||
if( tn.type != TapNoteType_HoldHead )
|
||||
continue;
|
||||
|
||||
switch( tn.subType )
|
||||
{
|
||||
DEFAULT_FAIL( tn.subType );
|
||||
case TapNote::hold_head_hold:
|
||||
case TapNoteSubType_Hold:
|
||||
continue;
|
||||
case TapNote::hold_head_roll:
|
||||
case TapNoteSubType_Roll:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2240,18 +2240,18 @@ void Player::StepStrumHopo( int col, int row, const RageTimer &tm, bool bHeld, b
|
||||
case PC_HUMAN:
|
||||
switch( pTN->type )
|
||||
{
|
||||
case TapNote::mine:
|
||||
case TapNoteType_Mine:
|
||||
// Stepped too close to mine?
|
||||
if( !bRelease && ( REQUIRE_STEP_ON_MINES == !bHeld ) &&
|
||||
fSecondsFromExact <= GetWindowSeconds(TW_Mine) &&
|
||||
m_Timing->IsJudgableAtRow(iSongRow))
|
||||
score = TNS_HitMine;
|
||||
break;
|
||||
case TapNote::attack:
|
||||
case TapNoteType_Attack:
|
||||
if( !bRelease && fSecondsFromExact <= GetWindowSeconds(TW_Attack) && !pTN->result.bHidden )
|
||||
score = AllowW1() ? TNS_W1 : TNS_W2; // sentinel
|
||||
break;
|
||||
case TapNote::hold_head:
|
||||
case TapNoteType_HoldHead:
|
||||
// oh wow, this was causing the trigger before the hold heads
|
||||
// bug. (It was fNoteOffset > 0.f before) -DaisuMaster
|
||||
if( !REQUIRE_STEP_ON_HOLD_HEADS && ( fNoteOffset <= GetWindowSeconds( TW_W5 ) && GetWindowSeconds( TW_W5 ) != 0 ) )
|
||||
@@ -2261,7 +2261,7 @@ void Player::StepStrumHopo( int col, int row, const RageTimer &tm, bool bHeld, b
|
||||
}
|
||||
// Fall through to default.
|
||||
default:
|
||||
if( (pTN->type == TapNote::lift) == bRelease )
|
||||
if( (pTN->type == TapNoteType_Lift) == bRelease )
|
||||
{
|
||||
if( fSecondsFromExact <= GetWindowSeconds(TW_W1) ) score = TNS_W1;
|
||||
else if( fSecondsFromExact <= GetWindowSeconds(TW_W2) ) score = TNS_W2;
|
||||
@@ -2292,14 +2292,14 @@ void Player::StepStrumHopo( int col, int row, const RageTimer &tm, bool bHeld, b
|
||||
|
||||
// TRICKY: We're asking the AI to judge mines. Consider TNS_W4 and
|
||||
// below as "mine was hit" and everything else as "mine was avoided"
|
||||
if( pTN->type == TapNote::mine )
|
||||
if( pTN->type == TapNoteType_Mine )
|
||||
{
|
||||
// The CPU hits a lot of mines. Only consider hitting the
|
||||
// first mine for a row. We know we're the first mine if
|
||||
// there are are no mines to the left of us.
|
||||
for( int t=0; t<col; t++ )
|
||||
{
|
||||
if( m_NoteData.GetTapNote(t,iRowOfOverlappingNoteOrRow).type == TapNote::mine ) // there's a mine to the left of us
|
||||
if( m_NoteData.GetTapNote(t,iRowOfOverlappingNoteOrRow).type == TapNoteType_Mine ) // there's a mine to the left of us
|
||||
return; // avoid
|
||||
}
|
||||
|
||||
@@ -2314,7 +2314,7 @@ void Player::StepStrumHopo( int col, int row, const RageTimer &tm, bool bHeld, b
|
||||
score = TNS_HitMine;
|
||||
}
|
||||
|
||||
if( pTN->type == TapNote::attack && score > TNS_W4 )
|
||||
if( pTN->type == TapNoteType_Attack && score > TNS_W4 )
|
||||
score = TNS_W2; // sentinel
|
||||
|
||||
/* AI will generate misses here. Don't handle a miss like a regular
|
||||
@@ -2405,7 +2405,7 @@ void Player::StepStrumHopo( int col, int row, const RageTimer &tm, bool bHeld, b
|
||||
for( int i=0; i<GAMESTATE->GetCurrentStyle()->m_iColsPerPlayer; i++ )
|
||||
{
|
||||
const TapNote &tn = m_NoteData.GetTapNote( i, iRowOfOverlappingNoteOrRow );
|
||||
bool bIsNote = (tn.type != TapNote::empty);
|
||||
bool bIsNote = (tn.type != TapNoteType_Empty);
|
||||
if( iFirstNoteCol == -1 && bIsNote )
|
||||
iFirstNoteCol = i;
|
||||
|
||||
@@ -2432,7 +2432,7 @@ void Player::StepStrumHopo( int col, int row, const RageTimer &tm, bool bHeld, b
|
||||
for( int i=GAMESTATE->GetCurrentStyle()->m_iColsPerPlayer-1; i>=0; i-- )
|
||||
{
|
||||
const TapNote &tn = m_NoteData.GetTapNote( i, iRowOfOverlappingNoteOrRow );
|
||||
bool bIsNote = (tn.type != TapNote::empty);
|
||||
bool bIsNote = (tn.type != TapNoteType_Empty);
|
||||
if( bIsNote )
|
||||
{
|
||||
iLastNoteCol = i;
|
||||
@@ -2462,7 +2462,7 @@ void Player::StepStrumHopo( int col, int row, const RageTimer &tm, bool bHeld, b
|
||||
}
|
||||
|
||||
const TapNote &tn = m_NoteData.GetTapNote( col, iRowOfOverlappingNoteOrRow );
|
||||
ASSERT( tn.type != TapNote::empty );
|
||||
ASSERT( tn.type != TapNoteType_Empty );
|
||||
|
||||
int iRowsAgoLastNote = 100000; // TODO: find more reasonable value based on HOPO_CHAIN_SECONDS?
|
||||
NoteData::all_tracks_reverse_iterator iter = m_NoteData.GetTapNoteRangeAllTracksReverse( iRowsAgoLastNote-iRowsAgoLastNote, iRowOfOverlappingNoteOrRow-1 );
|
||||
@@ -2489,7 +2489,7 @@ void Player::StepStrumHopo( int col, int row, const RageTimer &tm, bool bHeld, b
|
||||
}
|
||||
|
||||
// handle attack notes
|
||||
if( pTN->type == TapNote::attack && score == TNS_W2 )
|
||||
if( pTN->type == TapNoteType_Attack && score == TNS_W2 )
|
||||
{
|
||||
score = TNS_None; // don't score this as anything
|
||||
|
||||
@@ -2514,7 +2514,7 @@ void Player::StepStrumHopo( int col, int row, const RageTimer &tm, bool bHeld, b
|
||||
for( int t=0; t<m_NoteData.GetNumTracks(); t++ )
|
||||
{
|
||||
const TapNote &tn = m_NoteData.GetTapNote( t, iRowOfOverlappingNoteOrRow );
|
||||
if( tn.type == TapNote::attack )
|
||||
if( tn.type == TapNoteType_Attack )
|
||||
HideNote( t, iRowOfOverlappingNoteOrRow );
|
||||
}
|
||||
}
|
||||
@@ -2537,7 +2537,7 @@ void Player::StepStrumHopo( int col, int row, const RageTimer &tm, bool bHeld, b
|
||||
for( int t=0; t<m_NoteData.GetNumTracks(); t++ )
|
||||
{
|
||||
TapNote tn = m_NoteData.GetTapNote( t, iRowOfOverlappingNoteOrRow );
|
||||
if( tn.type != TapNote::empty )
|
||||
if( tn.type != TapNoteType_Empty )
|
||||
{
|
||||
tn.result.tns = score;
|
||||
tn.result.fTapNoteOffset = -fNoteOffset;
|
||||
@@ -2556,7 +2556,7 @@ void Player::StepStrumHopo( int col, int row, const RageTimer &tm, bool bHeld, b
|
||||
m_LastTapNoteScore = score;
|
||||
if( GAMESTATE->GetCurrentGame()->m_bCountNotesSeparately )
|
||||
{
|
||||
if( pTN->type != TapNote::mine )
|
||||
if( pTN->type != TapNoteType_Mine )
|
||||
{
|
||||
const bool bBlind = (m_pPlayerState->m_PlayerOptions.GetCurrent().m_fBlind != 0);
|
||||
// XXX: This is the wrong combo for shared players.
|
||||
@@ -2734,7 +2734,7 @@ void Player::UpdateTapNotesMissedOlderThan( float fMissIfOlderThanSeconds )
|
||||
if (!m_Timing->IsJudgableAtRow(iter.Row()))
|
||||
continue;
|
||||
|
||||
if( tn.type == TapNote::mine )
|
||||
if( tn.type == TapNoteType_Mine )
|
||||
{
|
||||
tn.result.tns = TNS_AvoidMine;
|
||||
|
||||
@@ -2793,9 +2793,9 @@ void Player::UpdateJudgedRows()
|
||||
for( int iTrack = 0; iTrack < m_NoteData.GetNumTracks(); ++iTrack )
|
||||
{
|
||||
const TapNote &tn = m_NoteData.GetTapNote( iTrack, iRow );
|
||||
if (tn.type == TapNote::empty ||
|
||||
tn.type == TapNote::mine ||
|
||||
tn.type == TapNote::autoKeysound) continue;
|
||||
if (tn.type == TapNoteType_Empty ||
|
||||
tn.type == TapNoteType_Mine ||
|
||||
tn.type == TapNoteType_AutoKeysound) continue;
|
||||
SetJudgment( tn.result.tns, iTrack, tn.result.fTapNoteOffset );
|
||||
}
|
||||
}
|
||||
@@ -2805,8 +2805,8 @@ void Player::UpdateJudgedRows()
|
||||
for( int iTrack = 0; iTrack < m_NoteData.GetNumTracks(); ++iTrack )
|
||||
{
|
||||
const TapNote &tn = m_NoteData.GetTapNote( iTrack, iRow );
|
||||
if (tn.type == TapNote::tap || tn.type == TapNote::lift ||
|
||||
( tn.type == TapNote::hold_head && REQUIRE_STEP_ON_HOLD_HEADS ) )
|
||||
if (tn.type == TapNoteType_Tap || tn.type == TapNoteType_Lift ||
|
||||
( tn.type == TapNoteType_HoldHead && REQUIRE_STEP_ON_HOLD_HEADS ) )
|
||||
{
|
||||
viColsWithTaps.push_back( iTrack );
|
||||
};
|
||||
@@ -2841,7 +2841,7 @@ void Player::UpdateJudgedRows()
|
||||
*m_pIterUnjudgedMineRows = iter;
|
||||
}
|
||||
|
||||
bool bMineNotHidden = tn.type == TapNote::mine && !tn.result.bHidden;
|
||||
bool bMineNotHidden = tn.type == TapNoteType_Mine && !tn.result.bHidden;
|
||||
if( !bMineNotHidden )
|
||||
continue;
|
||||
|
||||
@@ -2916,7 +2916,7 @@ void Player::FlashGhostRow( int iRow )
|
||||
{
|
||||
const TapNote &tn = m_NoteData.GetTapNote( iTrack, iRow );
|
||||
|
||||
if( tn.type == TapNote::empty || tn.type == TapNote::mine || tn.type == TapNote::fake )
|
||||
if( tn.type == TapNoteType_Empty || tn.type == TapNoteType_Mine || tn.type == TapNoteType_Fake )
|
||||
continue;
|
||||
if( m_pNoteField )
|
||||
m_pNoteField->DidTapNote( iTrack, lastTNS, bBright );
|
||||
@@ -2939,7 +2939,7 @@ void Player::CrossedRows( int iLastRowCrossed, const RageTimer &now )
|
||||
int iTrack = iter.Track();
|
||||
switch( tn.type )
|
||||
{
|
||||
case TapNote::hold_head:
|
||||
case TapNoteType_HoldHead:
|
||||
{
|
||||
tn.HoldResult.fLife = INITIAL_HOLD_LIFE;
|
||||
if( !REQUIRE_STEP_ON_HOLD_HEADS )
|
||||
@@ -2959,7 +2959,7 @@ void Player::CrossedRows( int iLastRowCrossed, const RageTimer &now )
|
||||
}
|
||||
break;
|
||||
}
|
||||
case TapNote::mine:
|
||||
case TapNoteType_Mine:
|
||||
{
|
||||
// Hold the panel while crossing a mine will cause the mine to explode
|
||||
// TODO: Remove use of PlayerNumber.
|
||||
@@ -2984,9 +2984,9 @@ void Player::CrossedRows( int iLastRowCrossed, const RageTimer &now )
|
||||
// check to see if there's a note at the crossed row
|
||||
if( m_pPlayerState->m_PlayerController != PC_HUMAN )
|
||||
{
|
||||
if (tn.type != TapNote::empty &&
|
||||
tn.type != TapNote::fake &&
|
||||
tn.type != TapNote::autoKeysound &&
|
||||
if (tn.type != TapNoteType_Empty &&
|
||||
tn.type != TapNoteType_Fake &&
|
||||
tn.type != TapNoteType_AutoKeysound &&
|
||||
tn.result.tns == TNS_None &&
|
||||
this->m_Timing->IsJudgableAtRow(iRow) )
|
||||
{
|
||||
@@ -3013,7 +3013,7 @@ void Player::CrossedRows( int iLastRowCrossed, const RageTimer &now )
|
||||
for (int t = 0; t < m_NoteData.GetNumTracks(); ++t)
|
||||
{
|
||||
const TapNote &tap = m_NoteData.GetTapNote(t, iRow);
|
||||
if (tap.type == TapNote::autoKeysound)
|
||||
if (tap.type == TapNoteType_AutoKeysound)
|
||||
{
|
||||
PlayKeysound(tap, TNS_None);
|
||||
}
|
||||
@@ -3047,7 +3047,7 @@ void Player::CrossedRows( int iLastRowCrossed, const RageTimer &now )
|
||||
for( ; !nIter.IsAtEnd(); ++nIter )
|
||||
{
|
||||
TapNote &tn = *nIter;
|
||||
if( tn.type != TapNote::hold_head )
|
||||
if( tn.type != TapNoteType_HoldHead )
|
||||
continue;
|
||||
|
||||
int iTrack = nIter.Track();
|
||||
@@ -3109,10 +3109,10 @@ void Player::HandleTapRowScore( unsigned row )
|
||||
{
|
||||
const TapNote &tn = m_NoteData.GetTapNote( track, row );
|
||||
// Mines cannot be handled here.
|
||||
if (tn.type == TapNote::empty ||
|
||||
tn.type == TapNote::fake ||
|
||||
tn.type == TapNote::mine ||
|
||||
tn.type == TapNote::autoKeysound)
|
||||
if (tn.type == TapNoteType_Empty ||
|
||||
tn.type == TapNoteType_Fake ||
|
||||
tn.type == TapNoteType_Mine ||
|
||||
tn.type == TapNoteType_AutoKeysound)
|
||||
continue;
|
||||
if( m_pPrimaryScoreKeeper )
|
||||
m_pPrimaryScoreKeeper->HandleTapScore( tn );
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ void ScoreKeeper::GetScoreOfLastTapInRow( const NoteData &nd, int iRow,
|
||||
{
|
||||
const TapNote &tn = nd.GetTapNote( track, iRow );
|
||||
|
||||
if( tn.type != TapNote::tap && tn.type != TapNote::hold_head )
|
||||
if( tn.type != TapNoteType_Tap && tn.type != TapNoteType_HoldHead )
|
||||
continue;
|
||||
++iNum;
|
||||
}
|
||||
|
||||
@@ -337,7 +337,7 @@ void ScoreKeeperNormal::HandleTapScore( const TapNote &tn )
|
||||
{
|
||||
TapNoteScore tns = tn.result.tns;
|
||||
|
||||
if( tn.type == TapNote::mine )
|
||||
if( tn.type == TapNoteType_Mine )
|
||||
{
|
||||
if( tns == TNS_HitMine )
|
||||
{
|
||||
@@ -463,7 +463,7 @@ void ScoreKeeperNormal::GetRowCounts( const NoteData &nd, int iRow,
|
||||
{
|
||||
const TapNote &tn = nd.GetTapNote( track, iRow );
|
||||
|
||||
if( tn.type != TapNote::tap && tn.type != TapNote::hold_head && tn.type != TapNote::lift )
|
||||
if( tn.type != TapNoteType_Tap && tn.type != TapNoteType_HoldHead && tn.type != TapNoteType_Lift )
|
||||
continue;
|
||||
TapNoteScore tns = tn.result.tns;
|
||||
if( tns >= m_MinScoreToContinueCombo )
|
||||
|
||||
+22
-22
@@ -1825,7 +1825,7 @@ bool ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB )
|
||||
m_NoteDataEdit.SetTapNote( iCol, iHeadRow, TAP_EMPTY );
|
||||
// Don't CheckNumberOfNotesAndUndo. We don't want to revert any change that removes notes.
|
||||
}
|
||||
else if( m_NoteDataEdit.GetTapNote(iCol, iSongIndex).type != TapNote::empty )
|
||||
else if( m_NoteDataEdit.GetTapNote(iCol, iSongIndex).type != TapNoteType_Empty )
|
||||
{
|
||||
m_soundRemoveNote.Play();
|
||||
SetDirty( true );
|
||||
@@ -1855,10 +1855,10 @@ bool ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB )
|
||||
{
|
||||
switch ( m_selectedTap.type )
|
||||
{
|
||||
case TapNote::tap: m_selectedTap = TAP_ORIGINAL_FAKE; break;
|
||||
case TapNote::mine: m_selectedTap = TAP_ORIGINAL_TAP; break;
|
||||
case TapNote::lift: m_selectedTap = TAP_ORIGINAL_MINE; break;
|
||||
case TapNote::fake: m_selectedTap = TAP_ORIGINAL_LIFT; break;
|
||||
case TapNoteType_Tap: m_selectedTap = TAP_ORIGINAL_FAKE; break;
|
||||
case TapNoteType_Mine: m_selectedTap = TAP_ORIGINAL_TAP; break;
|
||||
case TapNoteType_Lift: m_selectedTap = TAP_ORIGINAL_MINE; break;
|
||||
case TapNoteType_Fake: m_selectedTap = TAP_ORIGINAL_LIFT; break;
|
||||
DEFAULT_FAIL( m_selectedTap.type );
|
||||
}
|
||||
return true;
|
||||
@@ -1867,10 +1867,10 @@ bool ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB )
|
||||
{
|
||||
switch ( m_selectedTap.type )
|
||||
{
|
||||
case TapNote::tap: m_selectedTap = TAP_ORIGINAL_MINE; break;
|
||||
case TapNote::mine: m_selectedTap = TAP_ORIGINAL_LIFT; break;
|
||||
case TapNote::lift: m_selectedTap = TAP_ORIGINAL_FAKE; break;
|
||||
case TapNote::fake: m_selectedTap = TAP_ORIGINAL_TAP; break;
|
||||
case TapNoteType_Tap: m_selectedTap = TAP_ORIGINAL_MINE; break;
|
||||
case TapNoteType_Mine: m_selectedTap = TAP_ORIGINAL_LIFT; break;
|
||||
case TapNoteType_Lift: m_selectedTap = TAP_ORIGINAL_FAKE; break;
|
||||
case TapNoteType_Fake: m_selectedTap = TAP_ORIGINAL_TAP; break;
|
||||
DEFAULT_FAIL( m_selectedTap.type );
|
||||
}
|
||||
return true;
|
||||
@@ -3501,18 +3501,18 @@ void ScreenEdit::HandleScreenMessage( const ScreenMessage SM )
|
||||
// set note at this row to use this keysound file.
|
||||
// if it's empty, make it an auto keysound.
|
||||
newNote.iKeysoundIndex = sound;
|
||||
if (newNote.type == TapNote::empty)
|
||||
if (newNote.type == TapNoteType_Empty)
|
||||
{
|
||||
newNote.type = TapNote::autoKeysound; // keysounds need something non empty.
|
||||
newNote.type = TapNoteType_AutoKeysound; // keysounds need something non empty.
|
||||
}
|
||||
}
|
||||
else // sound > kses.size()
|
||||
{
|
||||
// remove the sound. if it's an auto keysound, make it empty.
|
||||
newNote.iKeysoundIndex = -1;
|
||||
if (newNote.type == TapNote::autoKeysound)
|
||||
if (newNote.type == TapNoteType_AutoKeysound)
|
||||
{
|
||||
newNote.type = TapNote::empty; // autoKeysound with no sound is pointless.
|
||||
newNote.type = TapNoteType_Empty; // autoKeysound with no sound is pointless.
|
||||
}
|
||||
}
|
||||
m_NoteDataEdit.SetTapNote(track, row, newNote);
|
||||
@@ -3530,8 +3530,8 @@ void ScreenEdit::HandleScreenMessage( const ScreenMessage SM )
|
||||
if (newNote.iKeysoundIndex == static_cast<int>(sound))
|
||||
{
|
||||
newNote.iKeysoundIndex = -1;
|
||||
if (newNote.type == TapNote::autoKeysound)
|
||||
newNote.type = TapNote::empty;
|
||||
if (newNote.type == TapNoteType_AutoKeysound)
|
||||
newNote.type = TapNoteType_Empty;
|
||||
}
|
||||
else if (newNote.iKeysoundIndex > static_cast<int>(sound))
|
||||
newNote.iKeysoundIndex--;
|
||||
@@ -3560,8 +3560,8 @@ void ScreenEdit::HandleScreenMessage( const ScreenMessage SM )
|
||||
{
|
||||
newNote.iKeysoundIndex = pos;
|
||||
}
|
||||
if (newNote.type == TapNote::empty)
|
||||
newNote.type = TapNote::autoKeysound; // keysounds need something non empty.
|
||||
if (newNote.type == TapNoteType_Empty)
|
||||
newNote.type = TapNoteType_AutoKeysound; // keysounds need something non empty.
|
||||
m_NoteDataEdit.SetTapNote(track, row, newNote);
|
||||
SetDirty(true);
|
||||
}
|
||||
@@ -3588,9 +3588,9 @@ void ScreenEdit::HandleScreenMessage( const ScreenMessage SM )
|
||||
const int row = BeatToNoteRow( GAMESTATE->m_Position.m_fSongBeat );
|
||||
|
||||
TapNote tn(
|
||||
TapNote::attack,
|
||||
TapNote::SubType_Invalid,
|
||||
TapNote::original,
|
||||
TapNoteType_Attack,
|
||||
TapNoteSubType_Invalid,
|
||||
TapNoteSource_Original,
|
||||
sMods,
|
||||
g_fLastInsertAttackDurationSeconds,
|
||||
-1 );
|
||||
@@ -4829,7 +4829,7 @@ void ScreenEdit::HandleAlterMenuChoice(AlterMenuChoice c, const vector<int> &iAn
|
||||
for (int t = 0; t < nd.GetNumTracks(); t++)
|
||||
{
|
||||
const TapNote &tn = nd.GetTapNote(t, r);
|
||||
if (tn.type != TapNote::empty)
|
||||
if (tn.type != TapNoteType_Empty)
|
||||
{
|
||||
TapNote nTap = tn;
|
||||
nTap.pn = (tn.pn == PLAYER_1 ?
|
||||
@@ -4858,7 +4858,7 @@ void ScreenEdit::HandleAlterMenuChoice(AlterMenuChoice c, const vector<int> &iAn
|
||||
for (int t = 0; t < tracks; t++)
|
||||
{
|
||||
const TapNote &tn = nd.GetTapNote(t, r);
|
||||
if (tn.type != TapNote::empty && tn.pn == oPN)
|
||||
if (tn.type != TapNoteType_Empty && tn.pn == oPN)
|
||||
{
|
||||
TapNote nTap = tn;
|
||||
nTap.pn = nPN;
|
||||
|
||||
@@ -1017,14 +1017,14 @@ void ScreenGameplay::SetupSong( int iSongIndex )
|
||||
// load player
|
||||
{
|
||||
pi->m_NoteData = ndTransformed;
|
||||
NoteDataUtil::RemoveAllTapsOfType( pi->m_NoteData, TapNote::autoKeysound );
|
||||
NoteDataUtil::RemoveAllTapsOfType( pi->m_NoteData, TapNoteType_AutoKeysound );
|
||||
pi->m_pPlayer->Load();
|
||||
}
|
||||
|
||||
// load auto keysounds
|
||||
{
|
||||
NoteData nd = ndTransformed;
|
||||
NoteDataUtil::RemoveAllTapsExceptForType( nd, TapNote::autoKeysound );
|
||||
NoteDataUtil::RemoveAllTapsExceptForType( nd, TapNoteType_AutoKeysound );
|
||||
m_AutoKeysounds.Load( pi->GetStepsAndTrailIndex(), nd );
|
||||
}
|
||||
|
||||
@@ -2057,7 +2057,7 @@ void ScreenGameplay::UpdateLights()
|
||||
// for each index we crossed since the last update:
|
||||
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( m_CabinetLightsNoteData, cl, r, iRowLastCrossed+1, iSongRow+1 )
|
||||
{
|
||||
if( m_CabinetLightsNoteData.GetTapNote( cl, r ).type != TapNote::empty )
|
||||
if( m_CabinetLightsNoteData.GetTapNote( cl, r ).type != TapNoteType_Empty )
|
||||
bBlinkCabinetLight[cl] = true;
|
||||
}
|
||||
|
||||
@@ -2076,7 +2076,7 @@ void ScreenGameplay::UpdateLights()
|
||||
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( nd, t, r, iRowLastCrossed+1, iSongRow+1 )
|
||||
{
|
||||
const TapNote &tn = nd.GetTapNote( t, r );
|
||||
if( tn.type != TapNote::mine )
|
||||
if( tn.type != TapNoteType_Mine )
|
||||
bBlink = true;
|
||||
}
|
||||
|
||||
@@ -2173,7 +2173,7 @@ void ScreenGameplay::SendCrossedMessages()
|
||||
int iNumTracksWithTapOrHoldHead = 0;
|
||||
for( int t=0; t<nd.GetNumTracks(); t++ )
|
||||
{
|
||||
if( nd.GetTapNote(t,r).type == TapNote::empty )
|
||||
if( nd.GetTapNote(t,r).type == TapNoteType_Empty )
|
||||
continue;
|
||||
|
||||
iNumTracksWithTapOrHoldHead++;
|
||||
|
||||
@@ -221,7 +221,7 @@ void ScreenHowToPlay::Step()
|
||||
{
|
||||
const int iNumTracks = m_NoteData.GetNumTracks();
|
||||
for( int k=0; k<iNumTracks; k++ )
|
||||
if( m_NoteData.GetTapNote(k, iNoteRow).type == TapNote::tap )
|
||||
if( m_NoteData.GetTapNote(k, iNoteRow).type == TapNoteType_Tap )
|
||||
iStep |= 1 << k;
|
||||
|
||||
switch( iStep )
|
||||
|
||||
@@ -97,7 +97,7 @@ void SoundEffectControl::HoldsBeingHeld( int iRow, int &iHoldsHeld, int &iHoldsL
|
||||
continue;
|
||||
|
||||
const TapNote &tn = begin->second;
|
||||
if( tn.type != TapNote::hold_head )
|
||||
if( tn.type != TapNoteType_HoldHead )
|
||||
continue;
|
||||
if( tn.HoldResult.bActive )
|
||||
++iHoldsHeld;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user