fix "Trail RadarValues off by -1"

This commit is contained in:
Chris Danford
2004-08-22 17:23:08 +00:00
parent 3022f850f4
commit c4febdcf62
5 changed files with 14 additions and 7 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ struct HighScore
iProductID = 0;
ZERO( iTapNoteScores );
ZERO( iHoldNoteScores );
radarValues.Init();
radarValues.MakeUnknown();
}
bool operator>=( const HighScore& other ) const;
+8 -2
View File
@@ -7,15 +7,21 @@
RadarValues::RadarValues()
{
Init();
MakeUnknown();
}
void RadarValues::Init()
void RadarValues::MakeUnknown()
{
FOREACH_RadarCategory( rc )
m_fValues[rc] = RADAR_VAL_UNKNOWN;
}
void RadarValues::Zero()
{
FOREACH_RadarCategory( rc )
m_fValues[rc] = 0;
}
XNode* RadarValues::CreateNode() const
{
XNode* pNode = new XNode;
+2 -1
View File
@@ -18,7 +18,8 @@ struct RadarValues
operator float* () { return m_fValues; };
RadarValues();
void Init();
void MakeUnknown();
void Zero();
RadarValues& operator+=( const RadarValues& other )
+2 -2
View File
@@ -31,8 +31,8 @@ void StageStats::Init()
ZERO( iTapNoteScores[p] );
ZERO( iHoldNoteScores[p] );
ZERO( radarPossible[p] ); // zero, don't init. We're going to be incrementing these
ZERO( radarActual[p] ); // zero, don't init. We're going to be incrementing these
radarPossible[p].Zero();
radarActual[p].Zero();
fFirstSecond[p] = 999999;
fLastSecond[p] = 0;
+1 -1
View File
@@ -65,7 +65,7 @@ RadarValues Trail::GetRadarValues() const
else
{
m_bRadarValuesCached = true;
m_CachedRadarValues.Init();
m_CachedRadarValues.Zero();
FOREACH_CONST( TrailEntry, m_vEntries, e )
{