don't count credits added on the system menu in bookkeeping

This commit is contained in:
Glenn Maynard
2006-12-19 09:09:16 +00:00
parent b29f884b95
commit 0340f75745
2 changed files with 7 additions and 5 deletions
+6 -4
View File
@@ -1193,20 +1193,22 @@ RString StepMania::SaveScreenshot( RString sDir, bool bSaveCompressed, bool bMak
return sFileName; return sFileName;
} }
void StepMania::InsertCoin( int iNum ) void StepMania::InsertCoin( int iNum, bool bCountInBookkeeping )
{
if( bCountInBookkeeping )
{ {
for( int i = 0; i < iNum; ++i )
LIGHTSMAN->PulseCoinCounter(); LIGHTSMAN->PulseCoinCounter();
BOOKKEEPER->CoinInserted();
}
GAMESTATE->m_iCoins += iNum; GAMESTATE->m_iCoins += iNum;
LOG->Trace("%i coins inserted, %i needed to play", GAMESTATE->m_iCoins, PREFSMAN->m_iCoinsPerCredit.Get() ); LOG->Trace("%i coins inserted, %i needed to play", GAMESTATE->m_iCoins, PREFSMAN->m_iCoinsPerCredit.Get() );
BOOKKEEPER->CoinInserted();
SCREENMAN->PlayCoinSound(); SCREENMAN->PlayCoinSound();
MESSAGEMAN->Broadcast( Message_CoinInserted ); MESSAGEMAN->Broadcast( Message_CoinInserted );
} }
void StepMania::InsertCredit() void StepMania::InsertCredit()
{ {
InsertCoin( PREFSMAN->m_iCoinsPerCredit ); InsertCoin( PREFSMAN->m_iCoinsPerCredit, false );
} }
/* 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
+1 -1
View File
@@ -17,7 +17,7 @@ namespace StepMania
// If successful, return filename of screenshot in sDir, else return "" // If successful, return filename of screenshot in sDir, else return ""
RString SaveScreenshot( RString sDir, bool bSaveCompressed, bool bMakeSignature, int iIndex = -1 ); RString SaveScreenshot( RString sDir, bool bSaveCompressed, bool bMakeSignature, int iIndex = -1 );
void InsertCoin( int iNum = 1 ); void InsertCoin( int iNum = 1, bool bCountInBookkeeping = true );
void InsertCredit(); void InsertCredit();
void GetPreferredVideoModeParams( VideoModeParams &paramsOut ); void GetPreferredVideoModeParams( VideoModeParams &paramsOut );