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