本文整理汇总了C++中NoteData::GetTapNoteRangeAllTracks方法的典型用法代码示例。如果您正苦于以下问题:C++ NoteData::GetTapNoteRangeAllTracks方法的具体用法?C++ NoteData::GetTapNoteRangeAllTracks怎么用?C++ NoteData::GetTapNoteRangeAllTracks使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NoteData
的用法示例。
在下文中一共展示了NoteData::GetTapNoteRangeAllTracks方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetActualRadarValues
void NoteDataWithScoring::GetActualRadarValues(const NoteData &in,
const PlayerStageStats &pss, float song_seconds, RadarValues& out)
{
using std::max;
// Anybody editing this function should also examine
// NoteDataUtil::CalculateRadarValues to make sure it handles things the
// same way.
// Some of this logic is similar or identical to
// NoteDataUtil::CalculateRadarValues because I couldn't figure out a good
// way to combine them into one. -Kyz
PlayerNumber pn= pss.m_player_number;
garv_state state;
NoteData::all_tracks_const_iterator curr_note=
in.GetTapNoteRangeAllTracks(0, MAX_NOTE_ROW);
TimingData* timing= GAMESTATE->GetProcessedTimingData();
// first_hittable_row and last_hittable_row exist so that
// GetActualVoltageRadarValue can be passed the correct song length.
// GetActualVoltageRadarValue scores based on the max combo, a full combo
// is a full voltage score. The song length is used instead of trying to
// figure out the max combo for the song because rolls mean there isn't a
// limit to the max combo. -Kyz
int first_hittable_row= -1;
int last_hittable_row= -1;
bool tick_holds= GAMESTATE->GetCurrentGame()->m_bTickHolds;
while(!curr_note.IsAtEnd())
{
if(curr_note.Row() != state.curr_row)
{
DoRowEndRadarActualCalc(state);
state.curr_row= curr_note.Row();
state.num_notes_on_curr_row= 0;
state.num_holds_on_curr_row= 0;
state.judgable= timing->IsJudgableAtRow(state.curr_row);
for(size_t n= 0; n < state.hold_ends.size(); ++n)
{
if(state.hold_ends[n].end_row < state.curr_row)
{
state.hold_ends.erase(state.hold_ends.begin() + n);
--n;
}
}
state.last_tns_on_row= TapNoteScore_Invalid;
state.last_time_on_row= -9999;
state.worst_tns_on_row= TapNoteScore_Invalid;
}
bool for_this_player= curr_note->pn == pn || pn == PLAYER_INVALID ||
curr_note->pn == PLAYER_INVALID;
if(state.judgable && for_this_player)
{
switch(curr_note->type)
{
case TapNoteType_HoldTail:
// If there are tick holds, then the hold tail needs to be counted
// in last_hittable_row because that's where the combo will end.
// -Kyz
if(tick_holds)
{
UpdateHittable(state.curr_row, first_hittable_row, last_hittable_row);
}
break;
case TapNoteType_Tap:
case TapNoteType_HoldHead:
// HoldTails and Attacks are counted by IsTap. But it doesn't
// make sense to count HoldTails as hittable notes. -Kyz
case TapNoteType_Attack:
case TapNoteType_Lift:
UpdateHittable(state.curr_row, first_hittable_row, last_hittable_row);
++state.num_notes_on_curr_row;
state.notes_hit_for_stream+= (curr_note->result.tns >= state.stream_tns);
state.notes_hit+= (curr_note->result.tns >= state.taps_tns);
if(curr_note->result.tns < state.worst_tns_on_row)
{
state.worst_tns_on_row= curr_note->result.tns;
}
if(curr_note->result.fTapNoteOffset > state.last_time_on_row)
{
state.last_time_on_row= curr_note->result.fTapNoteOffset;
state.last_tns_on_row= curr_note->result.tns;
}
if(curr_note->type == TapNoteType_HoldHead)
{
if(curr_note->subType == TapNoteSubType_Hold)
{
state.holds_held+= (curr_note->HoldResult.hns == HNS_Held);
}
else if(curr_note->subType == TapNoteSubType_Roll)
{
state.rolls_held+= (curr_note->HoldResult.hns == HNS_Held);
}
state.hold_ends.push_back(
hold_status(state.curr_row + curr_note->iDuration,
curr_note->HoldResult.iLastHeldRow));
++state.num_holds_on_curr_row;
}
else if(curr_note->type == TapNoteType_Lift)
{
state.lifts_hit+= (curr_note->result.tns >= state.lifts_tns);
}
//.........这里部分代码省略.........