add toggle for awarding item on combo break in battle
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include "RageUtil.h"
|
||||
#include "GameState.h"
|
||||
#include "RageTimer.h"
|
||||
#include "PrefsManager.h"
|
||||
|
||||
|
||||
#define NUM_ITEM_TYPES THEME->GetMetricF("Inventory","NumItemTypes")
|
||||
@@ -89,10 +90,17 @@ void Inventory::Update( float fDelta )
|
||||
int iNewCombo = m_iLastSeenCombo;
|
||||
|
||||
#define CROSSED(i) (iOldCombo<i)&&(iNewCombo>=i)
|
||||
#define BROKE_ABOVE(i) (iNewCombo<iOldCombo)&&(iOldCombo>=i)
|
||||
|
||||
for( unsigned i=0; i<g_Items.size(); i++ )
|
||||
{
|
||||
if( CROSSED(g_Items[i].iCombo) )
|
||||
bool bEarnedThisItem = false;
|
||||
if( PREFSMAN->m_bBreakComboToGetItem )
|
||||
bEarnedThisItem = BROKE_ABOVE(g_Items[i].iCombo);
|
||||
else
|
||||
bEarnedThisItem = CROSSED(g_Items[i].iCombo);
|
||||
|
||||
if( bEarnedThisItem )
|
||||
{
|
||||
AwardItem( i );
|
||||
break;
|
||||
|
||||
@@ -189,7 +189,7 @@ bool NoteFieldPositioning::Mode::MatchesCurrentGame() const
|
||||
* doesn't exist, return "". */
|
||||
int NoteFieldPositioning::GetID(const CString &name) const
|
||||
{
|
||||
LOG->Trace("look for %s", name.c_str());
|
||||
// LOG->Trace("look for %s", name.c_str());
|
||||
for(unsigned i = 0; i < Modes.size(); ++i)
|
||||
{
|
||||
if(Modes[i].name.CompareNoCase(name))
|
||||
|
||||
@@ -22,7 +22,7 @@ struct TapScoreDistribution
|
||||
{
|
||||
float fRand = randomf(0,1);
|
||||
ASSERT( iDifficultyExponent >= 1 );
|
||||
fRand = powf(fRand, iDifficultyExponent);
|
||||
fRand = powf( fRand, (float)iDifficultyExponent );
|
||||
for( int i=TNS_MISS; i<=TNS_MARVELOUS; i++ )
|
||||
if( fRand <= fCumulativeProbability[i] )
|
||||
return (TapNoteScore)i;
|
||||
|
||||
@@ -85,11 +85,12 @@ PrefsManager::PrefsManager()
|
||||
m_iBoostAppPriority = -1;
|
||||
m_iPolygonRadar = -1;
|
||||
m_bShowSongOptions = true;
|
||||
m_bDancePointsForOni = false; //DDR-Extreme style dance points instead of max2 percent
|
||||
m_bDancePointsForOni = false;
|
||||
m_bTimestamping = false;
|
||||
m_bShowLyrics = true;
|
||||
m_bAutogenMissingTypes = true;
|
||||
m_bAutogenGroupCourses = true;
|
||||
m_bBreakComboToGetItem = false;
|
||||
|
||||
/* DDR Extreme-style extra stage support.
|
||||
* Default off so people used to the current behavior (or those with extra
|
||||
@@ -191,6 +192,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame )
|
||||
ini.GetValueB( "Options", "AutogenGroupCourses", m_bAutogenGroupCourses );
|
||||
ini.GetValueB( "Options", "Timestamping", m_bTimestamping );
|
||||
ini.GetValue ( "Options", "DefaultModifiers", m_sDefaultModifiers );
|
||||
ini.GetValueB( "Options", "BreakComboToGetItem", m_bBreakComboToGetItem );
|
||||
|
||||
m_asAdditionalSongFolders.clear();
|
||||
CString sAdditionalSongFolders;
|
||||
@@ -271,6 +273,7 @@ void PrefsManager::SaveGlobalPrefsToDisk()
|
||||
ini.SetValueB( "Options", "AutogenGroupCourses", m_bAutogenGroupCourses );
|
||||
ini.SetValueB( "Options", "Timestamping", m_bTimestamping );
|
||||
ini.SetValue ( "Options", "DefaultModifiers", m_sDefaultModifiers );
|
||||
ini.SetValueB( "Options", "BreakComboToGetItem", m_bBreakComboToGetItem );
|
||||
|
||||
|
||||
/* Only write these if they aren't the default. This ensures that we can change
|
||||
|
||||
@@ -69,12 +69,13 @@ public:
|
||||
float m_fMarathonVerSongSeconds;
|
||||
bool m_bShowSongOptions;
|
||||
bool m_bSoloSingle;
|
||||
bool m_bDancePointsForOni;
|
||||
bool m_bDancePointsForOni; //DDR-Extreme style dance points instead of max2 percent
|
||||
bool m_bTimestamping;
|
||||
bool m_bShowLyrics;
|
||||
bool m_bAutogenMissingTypes;
|
||||
bool m_bAutogenGroupCourses;
|
||||
CString m_sDefaultModifiers;
|
||||
bool m_bBreakComboToGetItem;
|
||||
|
||||
/* 0 = no; 1 = yes; -1 = auto (do whatever is appropriate for the arch). */
|
||||
int m_iBoostAppPriority;
|
||||
|
||||
@@ -158,7 +158,7 @@ void ScreenSelect::DrawPrimitives()
|
||||
|
||||
void ScreenSelect::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
|
||||
{
|
||||
LOG->Trace( "ScreenSelect::Input()" );
|
||||
// LOG->Trace( "ScreenSelect::Input()" );
|
||||
|
||||
if( MenuI.IsValid() && MenuI.button==MENU_BUTTON_START )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user