add clearcredits
This commit is contained in:
@@ -62,6 +62,7 @@ void GameCommand::Init()
|
|||||||
m_sUrl = "";
|
m_sUrl = "";
|
||||||
|
|
||||||
m_bInsertCredit = false;
|
m_bInsertCredit = false;
|
||||||
|
m_bClearCredits = false;
|
||||||
m_bStopMusic = false;
|
m_bStopMusic = false;
|
||||||
m_bApplyDefaultOptions = false;
|
m_bApplyDefaultOptions = false;
|
||||||
}
|
}
|
||||||
@@ -374,6 +375,11 @@ void GameCommand::LoadOne( const Command& cmd )
|
|||||||
m_bInsertCredit = true;
|
m_bInsertCredit = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if( sName == "clearcredits" )
|
||||||
|
{
|
||||||
|
m_bClearCredits = true;
|
||||||
|
}
|
||||||
|
|
||||||
else if( sName == "stopmusic" )
|
else if( sName == "stopmusic" )
|
||||||
{
|
{
|
||||||
m_bStopMusic = true;
|
m_bStopMusic = true;
|
||||||
@@ -754,6 +760,10 @@ void GameCommand::ApplySelf( const vector<PlayerNumber> &vpns ) const
|
|||||||
{
|
{
|
||||||
StepMania::InsertCredit();
|
StepMania::InsertCredit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( m_bClearCredits )
|
||||||
|
StepMania::ClearCredits();
|
||||||
|
|
||||||
if( m_bApplyDefaultOptions )
|
if( m_bApplyDefaultOptions )
|
||||||
{
|
{
|
||||||
// applying options affects only the current stage
|
// applying options affects only the current stage
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ public:
|
|||||||
RString m_sUrl;
|
RString m_sUrl;
|
||||||
|
|
||||||
bool m_bInsertCredit;
|
bool m_bInsertCredit;
|
||||||
|
bool m_bClearCredits;
|
||||||
bool m_bStopMusic;
|
bool m_bStopMusic;
|
||||||
bool m_bApplyDefaultOptions;
|
bool m_bApplyDefaultOptions;
|
||||||
|
|
||||||
|
|||||||
@@ -1198,6 +1198,14 @@ void StepMania::InsertCredit()
|
|||||||
InsertCoin( PREFSMAN->m_iCoinsPerCredit, false );
|
InsertCoin( PREFSMAN->m_iCoinsPerCredit, false );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void StepMania::ClearCredits()
|
||||||
|
{
|
||||||
|
LOG->Trace("%i coins cleared", GAMESTATE->m_iCoins );
|
||||||
|
GAMESTATE->m_iCoins = 0;
|
||||||
|
SCREENMAN->PlayInvalidSound();
|
||||||
|
MESSAGEMAN->Broadcast( Message_CoinInserted );
|
||||||
|
}
|
||||||
|
|
||||||
/* Returns true if the key has been handled and should be discarded, false if
|
/* Returns true if the key has been handled and should be discarded, false if
|
||||||
* the key should be sent on to screens. */
|
* the key should be sent on to screens. */
|
||||||
static LocalizedString SERVICE_SWITCH_PRESSED ( "StepMania", "Service switch pressed" );
|
static LocalizedString SERVICE_SWITCH_PRESSED ( "StepMania", "Service switch pressed" );
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ namespace StepMania
|
|||||||
|
|
||||||
void InsertCoin( int iNum = 1, bool bCountInBookkeeping = true );
|
void InsertCoin( int iNum = 1, bool bCountInBookkeeping = true );
|
||||||
void InsertCredit();
|
void InsertCredit();
|
||||||
|
void ClearCredits();
|
||||||
|
|
||||||
void GetPreferredVideoModeParams( VideoModeParams ¶msOut );
|
void GetPreferredVideoModeParams( VideoModeParams ¶msOut );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user