More prep work for better radar calculations.
This commit is contained in:
+2
-2
@@ -206,9 +206,9 @@ TimingData * GameState::GetProcessedTimingData() const
|
|||||||
return this->processedTiming;
|
return this->processedTiming;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameState::SetProcessedTimingData(TimingData t)
|
void GameState::SetProcessedTimingData(TimingData * t)
|
||||||
{
|
{
|
||||||
this->processedTiming = &t;
|
this->processedTiming = t;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameState::ApplyGameCommand( const RString &sCommand, PlayerNumber pn )
|
void GameState::ApplyGameCommand( const RString &sCommand, PlayerNumber pn )
|
||||||
|
|||||||
+1
-1
@@ -160,7 +160,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* @brief Set the timing data to be used with processing.
|
* @brief Set the timing data to be used with processing.
|
||||||
* @param t the timing data. */
|
* @param t the timing data. */
|
||||||
void SetProcessedTimingData(TimingData t);
|
void SetProcessedTimingData(TimingData * t);
|
||||||
|
|
||||||
bool IsCourseMode() const;
|
bool IsCourseMode() const;
|
||||||
bool IsBattleMode() const; // not Rave
|
bool IsBattleMode() const; // not Rave
|
||||||
|
|||||||
@@ -120,6 +120,7 @@ void ScoreKeeperNormal::Load(
|
|||||||
* forced and not chosen by the user. */
|
* forced and not chosen by the user. */
|
||||||
NoteDataUtil::TransformNoteData( nd, aa, pSteps->m_StepsType, pSong );
|
NoteDataUtil::TransformNoteData( nd, aa, pSteps->m_StepsType, pSong );
|
||||||
RadarValues rvPre;
|
RadarValues rvPre;
|
||||||
|
GAMESTATE->SetProcessedTimingData(&pSteps->m_Timing);
|
||||||
NoteDataUtil::CalculateRadarValues( nd, pSong->m_fMusicLengthSeconds, rvPre );
|
NoteDataUtil::CalculateRadarValues( nd, pSong->m_fMusicLengthSeconds, rvPre );
|
||||||
|
|
||||||
/* Apply user transforms to find out how the notes will really look.
|
/* Apply user transforms to find out how the notes will really look.
|
||||||
@@ -132,6 +133,7 @@ void ScoreKeeperNormal::Load(
|
|||||||
NoteDataUtil::TransformNoteData( nd, m_pPlayerState->m_PlayerOptions.GetStage(), pSteps->m_StepsType );
|
NoteDataUtil::TransformNoteData( nd, m_pPlayerState->m_PlayerOptions.GetStage(), pSteps->m_StepsType );
|
||||||
RadarValues rvPost;
|
RadarValues rvPost;
|
||||||
NoteDataUtil::CalculateRadarValues( nd, pSong->m_fMusicLengthSeconds, rvPost );
|
NoteDataUtil::CalculateRadarValues( nd, pSong->m_fMusicLengthSeconds, rvPost );
|
||||||
|
GAMESTATE->SetProcessedTimingData(NULL);
|
||||||
|
|
||||||
iTotalPossibleDancePoints += this->GetPossibleDancePoints( rvPre, rvPost );
|
iTotalPossibleDancePoints += this->GetPossibleDancePoints( rvPre, rvPost );
|
||||||
iTotalPossibleGradePoints += this->GetPossibleGradePoints( rvPre, rvPost );
|
iTotalPossibleGradePoints += this->GetPossibleGradePoints( rvPre, rvPost );
|
||||||
|
|||||||
@@ -2294,10 +2294,12 @@ void ScreenGameplay::SaveStats()
|
|||||||
RadarValues rv;
|
RadarValues rv;
|
||||||
PlayerStageStats &pss = *pi->GetPlayerStageStats();
|
PlayerStageStats &pss = *pi->GetPlayerStageStats();
|
||||||
const NoteData &nd = pi->m_pPlayer->GetNoteData();
|
const NoteData &nd = pi->m_pPlayer->GetNoteData();
|
||||||
|
PlayerNumber pn = pi->m_pn;
|
||||||
|
|
||||||
|
GAMESTATE->SetProcessedTimingData(&GAMESTATE->m_pCurSteps[pn]->m_Timing);
|
||||||
NoteDataUtil::CalculateRadarValues( nd, fMusicLen, rv );
|
NoteDataUtil::CalculateRadarValues( nd, fMusicLen, rv );
|
||||||
pss.m_radarPossible += rv;
|
pss.m_radarPossible += rv;
|
||||||
|
GAMESTATE->SetProcessedTimingData(NULL);
|
||||||
NoteDataWithScoring::GetActualRadarValues( nd, pss, fMusicLen, rv );
|
NoteDataWithScoring::GetActualRadarValues( nd, pss, fMusicLen, rv );
|
||||||
pss.m_radarActual += rv;
|
pss.m_radarActual += rv;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "Steps.h"
|
#include "Steps.h"
|
||||||
#include "StepsUtil.h"
|
#include "StepsUtil.h"
|
||||||
|
#include "GameState.h"
|
||||||
#include "Song.h"
|
#include "Song.h"
|
||||||
#include "RageUtil.h"
|
#include "RageUtil.h"
|
||||||
#include "RageLog.h"
|
#include "RageLog.h"
|
||||||
@@ -192,6 +193,7 @@ void Steps::CalculateRadarValues( float fMusicLengthSeconds )
|
|||||||
FOREACH_PlayerNumber( pn )
|
FOREACH_PlayerNumber( pn )
|
||||||
m_CachedRadarValues[pn].Zero();
|
m_CachedRadarValues[pn].Zero();
|
||||||
|
|
||||||
|
GAMESTATE->SetProcessedTimingData(&this->m_Timing);
|
||||||
if( tempNoteData.IsComposite() )
|
if( tempNoteData.IsComposite() )
|
||||||
{
|
{
|
||||||
vector<NoteData> vParts;
|
vector<NoteData> vParts;
|
||||||
@@ -205,6 +207,7 @@ void Steps::CalculateRadarValues( float fMusicLengthSeconds )
|
|||||||
NoteDataUtil::CalculateRadarValues( tempNoteData, fMusicLengthSeconds, m_CachedRadarValues[0] );
|
NoteDataUtil::CalculateRadarValues( tempNoteData, fMusicLengthSeconds, m_CachedRadarValues[0] );
|
||||||
fill_n( m_CachedRadarValues + 1, NUM_PLAYERS-1, m_CachedRadarValues[0] );
|
fill_n( m_CachedRadarValues + 1, NUM_PLAYERS-1, m_CachedRadarValues[0] );
|
||||||
}
|
}
|
||||||
|
GAMESTATE->SetProcessedTimingData(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Steps::Decompress() const
|
void Steps::Decompress() const
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "Trail.h"
|
#include "Trail.h"
|
||||||
#include "Foreach.h"
|
#include "Foreach.h"
|
||||||
|
#include "GameState.h"
|
||||||
#include "Steps.h"
|
#include "Steps.h"
|
||||||
#include "Song.h"
|
#include "Song.h"
|
||||||
#include "PlayerOptions.h"
|
#include "PlayerOptions.h"
|
||||||
@@ -116,6 +117,7 @@ const RadarValues &Trail::GetRadarValues() const
|
|||||||
NoteData nd;
|
NoteData nd;
|
||||||
pSteps->GetNoteData( nd );
|
pSteps->GetNoteData( nd );
|
||||||
RadarValues rv_orig;
|
RadarValues rv_orig;
|
||||||
|
GAMESTATE->SetProcessedTimingData(const_cast<TimingData *>(&pSteps->m_Timing));
|
||||||
NoteDataUtil::CalculateRadarValues( nd, e->pSong->m_fMusicLengthSeconds, rv_orig );
|
NoteDataUtil::CalculateRadarValues( nd, e->pSong->m_fMusicLengthSeconds, rv_orig );
|
||||||
PlayerOptions po;
|
PlayerOptions po;
|
||||||
po.FromString( e->Modifiers );
|
po.FromString( e->Modifiers );
|
||||||
@@ -124,6 +126,7 @@ const RadarValues &Trail::GetRadarValues() const
|
|||||||
NoteDataUtil::TransformNoteData( nd, e->Attacks, pSteps->m_StepsType, e->pSong );
|
NoteDataUtil::TransformNoteData( nd, e->Attacks, pSteps->m_StepsType, e->pSong );
|
||||||
RadarValues transformed_rv;
|
RadarValues transformed_rv;
|
||||||
NoteDataUtil::CalculateRadarValues( nd, e->pSong->m_fMusicLengthSeconds, transformed_rv );
|
NoteDataUtil::CalculateRadarValues( nd, e->pSong->m_fMusicLengthSeconds, transformed_rv );
|
||||||
|
GAMESTATE->SetProcessedTimingData(NULL);
|
||||||
rv += transformed_rv;
|
rv += transformed_rv;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user