cleanup
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "LifeMeterBar.h"
|
#include "LifeMeterBar.h"
|
||||||
#include "PrefsManager.h"
|
#include "PrefsManager.h"
|
||||||
|
#include "RageLog.h"
|
||||||
#include "RageTimer.h"
|
#include "RageTimer.h"
|
||||||
#include "GameState.h"
|
#include "GameState.h"
|
||||||
#include "RageMath.h"
|
#include "RageMath.h"
|
||||||
@@ -13,7 +14,7 @@
|
|||||||
#include "ActorUtil.h"
|
#include "ActorUtil.h"
|
||||||
#include "StreamDisplay.h"
|
#include "StreamDisplay.h"
|
||||||
#include "Steps.h"
|
#include "Steps.h"
|
||||||
|
#include "Course.h"
|
||||||
|
|
||||||
static void LifePercentChangeInit( size_t /*ScoreEvent*/ i, RString &sNameOut, float &defaultValueOut )
|
static void LifePercentChangeInit( size_t /*ScoreEvent*/ i, RString &sNameOut, float &defaultValueOut )
|
||||||
{
|
{
|
||||||
@@ -328,11 +329,10 @@ void LifeMeterBar::DrawPrimitives()
|
|||||||
{
|
{
|
||||||
ActorFrame::DrawPrimitives();
|
ActorFrame::DrawPrimitives();
|
||||||
}
|
}
|
||||||
#include "RageLog.h"
|
|
||||||
#include "Course.h"
|
|
||||||
void LifeMeterBar::UpdateNonstopLifebar()
|
void LifeMeterBar::UpdateNonstopLifebar()
|
||||||
{
|
{
|
||||||
int cleared, total, ProgressiveLifebarDifficulty;
|
int iCleared, iTotal, iProgressiveLifebarDifficulty;
|
||||||
|
|
||||||
switch( GAMESTATE->m_PlayMode )
|
switch( GAMESTATE->m_PlayMode )
|
||||||
{
|
{
|
||||||
@@ -340,21 +340,21 @@ void LifeMeterBar::UpdateNonstopLifebar()
|
|||||||
if( GAMESTATE->IsEventMode() || GAMESTATE->m_bDemonstrationOrJukebox )
|
if( GAMESTATE->IsEventMode() || GAMESTATE->m_bDemonstrationOrJukebox )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
cleared = GAMESTATE->GetStageIndex();
|
iCleared = GAMESTATE->GetStageIndex();
|
||||||
total = PREFSMAN->m_iSongsPerPlay;
|
iTotal = PREFSMAN->m_iSongsPerPlay;
|
||||||
ProgressiveLifebarDifficulty = PREFSMAN->m_iProgressiveStageLifebar;
|
iProgressiveLifebarDifficulty = PREFSMAN->m_iProgressiveStageLifebar;
|
||||||
break;
|
break;
|
||||||
case PLAY_MODE_NONSTOP:
|
case PLAY_MODE_NONSTOP:
|
||||||
cleared = GAMESTATE->GetCourseSongIndex();
|
iCleared = GAMESTATE->GetCourseSongIndex();
|
||||||
total = GAMESTATE->m_pCurCourse->GetEstimatedNumStages();
|
iTotal = GAMESTATE->m_pCurCourse->GetEstimatedNumStages();
|
||||||
ProgressiveLifebarDifficulty = PREFSMAN->m_iProgressiveNonstopLifebar;
|
iProgressiveLifebarDifficulty = PREFSMAN->m_iProgressiveNonstopLifebar;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (cleared > total) cleared = total; // clear/total <= 1
|
// if (iCleared > iTotal) iCleared = iTotal; // clear/iTotal <= 1
|
||||||
// if (total == 0) total = 1; // no division by 0
|
// if (iTotal == 0) iTotal = 1; // no division by 0
|
||||||
|
|
||||||
if( GAMESTATE->IsAnExtraStage() )
|
if( GAMESTATE->IsAnExtraStage() )
|
||||||
{ // extra stage is its own thing, should not be progressive
|
{ // extra stage is its own thing, should not be progressive
|
||||||
@@ -376,10 +376,10 @@ void LifeMeterBar::UpdateNonstopLifebar()
|
|||||||
return;
|
return;
|
||||||
} */
|
} */
|
||||||
|
|
||||||
if( total > 1 )
|
if( iTotal > 1 )
|
||||||
m_fLifeDifficulty = m_fBaseLifeDifficulty - 0.2f * (int)(ProgressiveLifebarDifficulty * cleared / (total - 1));
|
m_fLifeDifficulty = m_fBaseLifeDifficulty - 0.2f * (int)(iProgressiveLifebarDifficulty * iCleared / (iTotal - 1));
|
||||||
else
|
else
|
||||||
m_fLifeDifficulty = m_fBaseLifeDifficulty - 0.2f * ProgressiveLifebarDifficulty;
|
m_fLifeDifficulty = m_fBaseLifeDifficulty - 0.2f * iProgressiveLifebarDifficulty;
|
||||||
|
|
||||||
if( m_fLifeDifficulty >= 0.4f )
|
if( m_fLifeDifficulty >= 0.4f )
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user