weee progressive lifebar (like ddrex)
This commit is contained in:
@@ -254,6 +254,10 @@ LifeMeterBar::LifeMeterBar()
|
||||
this->AddChild( &m_quadBlackBackground );
|
||||
this->AddChild( m_pStream );
|
||||
|
||||
// set up progressive lifebar
|
||||
m_iProgressiveLifebar = PREFSMAN->m_iProgressiveLifebar;
|
||||
m_iMissCombo = 0;
|
||||
|
||||
AfterLifeChanged();
|
||||
}
|
||||
|
||||
@@ -322,6 +326,23 @@ void LifeMeterBar::ChangeLife( TapNoteScore score )
|
||||
ASSERT(0);
|
||||
}
|
||||
|
||||
// handle progressiveness here
|
||||
switch( score )
|
||||
{
|
||||
case TNS_MARVELOUS:
|
||||
case TNS_PERFECT:
|
||||
case TNS_GREAT:
|
||||
case TNS_GOOD:
|
||||
m_iMissCombo = 0;
|
||||
break;
|
||||
case TNS_BOO:
|
||||
case TNS_MISS:
|
||||
fDeltaLife *= 1 + (float)m_iProgressiveLifebar/8 * m_iMissCombo;
|
||||
// do this after; only successive boo/miss will
|
||||
// increase the amount of life lost.
|
||||
m_iMissCombo++;
|
||||
}
|
||||
|
||||
if( fDeltaLife > 0 )
|
||||
fDeltaLife *= PREFSMAN->m_fLifeDifficultyScale;
|
||||
else
|
||||
|
||||
@@ -49,6 +49,9 @@ private:
|
||||
|
||||
float m_fHotAlpha;
|
||||
bool m_bFailedEarlier; // set this to true when life dips below 0
|
||||
|
||||
int m_iProgressiveLifebar; // cached from prefs
|
||||
int m_iMissCombo; // current number of progressive boo/miss
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -103,6 +103,9 @@ PrefsManager::PrefsManager()
|
||||
m_bDebugMode = false;
|
||||
|
||||
m_bTenFooterInRed = true;
|
||||
|
||||
// set to 0 so people aren't shocked at first
|
||||
m_iProgressiveLifebar = 0;
|
||||
|
||||
/* DDR Extreme-style extra stage support.
|
||||
* Default off so people used to the current behavior (or those with extra
|
||||
@@ -218,6 +221,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame )
|
||||
ini.GetValueB( "Options", "ShowDancingCharacters", m_bShowDancingCharacters );
|
||||
ini.GetValueB( "Options", "TenFooterInRed", m_bTenFooterInRed );
|
||||
ini.GetValueI( "Options", "CourseSortOrder", (int&)m_iCourseSortOrder );
|
||||
ini.GetValueI( "Options", "ProgressiveLifebar", (int&)m_iProgressiveLifebar );
|
||||
|
||||
ini.GetValueB( "Options", "UseUnlockSystem", m_bUseUnlockSystem );
|
||||
|
||||
@@ -330,7 +334,7 @@ void PrefsManager::SaveGlobalPrefsToDisk()
|
||||
|
||||
ini.SetValueB( "Options", "TenFooterInRed", m_bTenFooterInRed );
|
||||
ini.SetValueI( "Options", "CourseSortOrder", m_iCourseSortOrder );
|
||||
|
||||
ini.SetValueI( "Options", "ProgressiveLifebar", m_iProgressiveLifebar );
|
||||
|
||||
/* Only write these if they aren't the default. This ensures that we can change
|
||||
* the default and have it take effect for everyone (except people who
|
||||
|
||||
@@ -83,6 +83,7 @@ public:
|
||||
float m_fGlobalOffsetSeconds;
|
||||
bool m_bDebugMode;
|
||||
bool m_bTenFooterInRed;
|
||||
int m_iProgressiveLifebar;
|
||||
|
||||
// course ranking
|
||||
enum { COURSE_SORT_SONGS, COURSE_SORT_METER, COURSE_SORT_METER_SUM, COURSE_SORT_RANK } m_iCourseSortOrder;
|
||||
|
||||
@@ -30,6 +30,7 @@ enum {
|
||||
MO_NUM_ARCADE_STAGES,
|
||||
MO_JUDGE_DIFFICULTY,
|
||||
MO_LIFE_DIFFICULTY,
|
||||
MO_PROGRESSIVE_LIFEBAR,
|
||||
MO_FAIL,
|
||||
MO_SHOWSTATS,
|
||||
MO_COINS_PER_CREDIT,
|
||||
@@ -44,6 +45,7 @@ OptionRow g_MachineOptionsLines[NUM_MACHINE_OPTIONS_LINES] = {
|
||||
OptionRow( "Songs Per\nPlay", "1","2","3","4","5","6","7","UNLIMITED" ),
|
||||
OptionRow( "Judge\nDifficulty", "1","2","3","4","5","6","7","8" ),
|
||||
OptionRow( "Life\nDifficulty", "1","2","3","4","5","6","7" ),
|
||||
OptionRow( "Progressive\nLifebar", "OFF","1","2","3","4","5","6","7","8"),
|
||||
OptionRow( "Default\nFail Type", "ARCADE","END OF SONG","OFF" ),
|
||||
OptionRow( "Show\nStats", "OFF","ON" ),
|
||||
OptionRow( "Coins Per\nCredit", "1","2","3","4","5","6","7","8" ),
|
||||
@@ -101,6 +103,7 @@ void ScreenMachineOptions::ImportOptions()
|
||||
|
||||
SongOptions so;
|
||||
so.FromString( PREFSMAN->m_sDefaultModifiers );
|
||||
m_iSelectedOption[0][MO_PROGRESSIVE_LIFEBAR] = PREFSMAN->m_iProgressiveLifebar;
|
||||
m_iSelectedOption[0][MO_FAIL] = so.m_FailType;
|
||||
m_iSelectedOption[0][MO_SHOWSTATS] = PREFSMAN->m_bShowStats ? 1:0;
|
||||
m_iSelectedOption[0][MO_COINS_PER_CREDIT] = PREFSMAN->m_iCoinsPerCredit - 1;
|
||||
@@ -146,6 +149,8 @@ void ScreenMachineOptions::ExportOptions()
|
||||
default: ASSERT(0);
|
||||
}
|
||||
|
||||
PREFSMAN->m_iProgressiveLifebar = m_iSelectedOption[0][MO_PROGRESSIVE_LIFEBAR];
|
||||
|
||||
CString sModifiers = PREFSMAN->m_sDefaultModifiers;
|
||||
PlayerOptions po;
|
||||
po.FromString( sModifiers );
|
||||
|
||||
Reference in New Issue
Block a user