Adding basic coin support

This commit is contained in:
Chris Danford
2003-01-19 04:44:22 +00:00
parent 4b0fa9aae6
commit ab9f558c6e
41 changed files with 494 additions and 375 deletions
+20
View File
@@ -14,6 +14,9 @@
#include "GameManager.h"
#include "GameState.h"
#include "PrefsManager.h"
#include "RageSound.h"
#include "ThemeManager.h"
#include "ScreenManager.h"
Screen::Screen()
{
@@ -92,9 +95,26 @@ void Screen::Input( const DeviceInput& DeviceI, const InputEventType type, const
case MENU_BUTTON_RIGHT: this->MenuRight( MenuI.player, type ); return;
case MENU_BUTTON_BACK: this->MenuBack( MenuI.player, type ); return;
case MENU_BUTTON_START: this->MenuStart( MenuI.player, type ); return;
case MENU_BUTTON_COIN: this->MenuCoin( MenuI.player, type ); return;
}
}
void Screen::MenuCoin( PlayerNumber pn )
{
switch( PREFSMAN->m_CoinMode )
{
case PrefsManager::COIN_PAY:
GAMESTATE->m_iCoins++;
SCREENMAN->RefreshCreditsMessages();
// fall through
case PrefsManager::COIN_HOME:
case PrefsManager::COIN_FREE:
SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","insert coin") );
break;
default:
ASSERT(0);
}
}
void Screen::SendScreenMessage( ScreenMessage SM, float fDelay )
{