Change event mode to a CoinMode (since using COIN_PAY and EventMode at the same time doesn't make sense).
Split ScreenLogo and ScreenTitleMenu. In ScreenTitleMenu, add a different animation if using COIN_HOME (for SMMAX2). Added codes at TitleMenu to change Theme and Announcer.
This commit is contained in:
@@ -42,6 +42,8 @@ NEW FEATURE: Set default player and song options in stepmania.ini using
|
||||
DefaultModifiers.
|
||||
NEW FEATURE: Courses can be organized into group folders. See
|
||||
README-FIRST.html for details.
|
||||
NEW FEATURE: Switch current theme from TitleMenu with L,L,L,R,R,R,L,R.
|
||||
NEW FEATURE: Switch current announcer from TitleMenu with L,L,R,R,L,R,L,R.
|
||||
|
||||
----------------------- Version 3.01 ---------------------------
|
||||
CHANGE: Simplified NoteSkin tap graphic format. Old NoteSkins will need to
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
ScreenLogo background
|
||||
@@ -0,0 +1 @@
|
||||
_missing
|
||||
@@ -0,0 +1 @@
|
||||
_fade in
|
||||
@@ -0,0 +1 @@
|
||||
_fade out
|
||||
@@ -22,6 +22,10 @@ InitialScreen=ScreenCompany
|
||||
DefaultScrollDirection=0
|
||||
|
||||
[ScreenTitleMenu]
|
||||
LogoHomeOnCommand=x,320;y,240;zoomy,0;sleep,0.5;bounceend,0.5;zoomy,1;glowshift;effectperiod,2.5;effectcolor1,1,1,1,0.1;effectcolor2,1,1,1,0.3
|
||||
LogoOnCommand=x,320;y,240;zoomy,0;sleep,0.5;bounceend,0.5;zoomy,1;glowshift;effectperiod,2.5;effectcolor1,1,1,1,0.1;effectcolor2,1,1,1,0.3
|
||||
VersionOnCommand=horizalign,right;x,620;y,20;diffuse,0.6,0.6,0.6,1;zoom,0.5;shadowlength,2
|
||||
SongsOnCommand=horizalign,left;x,20;y,20;diffuse,0.6,0.6,0.6,1;zoom,0.5;shadowlength,2
|
||||
ChoicesX=320
|
||||
ChoicesStartY=92
|
||||
ChoicesSpacingY=52
|
||||
@@ -37,6 +41,7 @@ SecondsBeforeAttract=30
|
||||
HelpTextHome=Use &UP; &DOWN; to select, then press START
|
||||
HelpTextPay=Press START to begin
|
||||
HelpTextFree=Press START to begin
|
||||
HelpTextEvent=Press START to begin
|
||||
NextScreen=ScreenCaution
|
||||
|
||||
[ScreenCaution]
|
||||
@@ -1069,6 +1074,8 @@ Reverse=Down,Left,Right,Left,Right
|
||||
HoldNotes=Right,Left,Down,Up
|
||||
Dark=
|
||||
CancelAll=Left,Right,Left,Right,Left,Right,Left,Right
|
||||
NextTheme=Left,Left,Left,Right,Right,Right,Left,Right
|
||||
NextAnnouncer=Left,Left,Right,Right,Left,Left,Right,Right
|
||||
|
||||
[GrooveRadar]
|
||||
Label1OffsetX=0 // stream
|
||||
@@ -1119,7 +1126,7 @@ WheelSpeed=Adjusts the speed of the DDR style musicwheel.
|
||||
[ScreenMachineOptions]
|
||||
HelpText=&UP; &DOWN; to change line &LEFT; &RIGHT; to select between options::START to accept changes BACK to discard changes
|
||||
MenuTimer=Turn this &oq;OFF&cq; to disable the time limit in menus.
|
||||
ArcadeStages=The number of songs a player can play in Arcade mode.::Set this to &oq;Unlimited&cq;, and you can continue playing forever.::Also, when this option is set to &oq;Unlimited&cq;, failing will take you::back to the the Select Music or Select Course screen.
|
||||
SongsPerPlay=The number of songs a player can play in Arcade mode.::Set this to &oq;Unlimited&cq;, and you can continue playing forever.::Also, when this option is set to &oq;Unlimited&cq;, failing will take you::back to the the Select Music or Select Course screen.
|
||||
JudgeDifficulty=Increase this value to cause your steps to be judged more strictly::(i.e. shink the timing window).
|
||||
LifeDifficulty=Increate this value to cause your life meter to::drain faster and refill slower.
|
||||
DefaultFailType=Choose the conditions for game over.::ARCADE will stop the music immediately when all players have 0 life.::END OF SONG will cause the game to end at the conclusion of the current song::if all players failed at some point during the song.::OFF disables game over entirely.
|
||||
@@ -1224,8 +1231,6 @@ NextScreen=ScreenLogo
|
||||
|
||||
[ScreenLogo]
|
||||
LogoOnCommand=x,320;y,240;zoomy,0;sleep,0.5;bounceend,0.5;zoomy,1;glowshift;effectperiod,2.5;effectcolor1,1,1,1,0.1;effectcolor2,1,1,1,0.3
|
||||
VersionOnCommand=horizalign,right;x,620;y,20;diffuse,0.6,0.6,0.6,1;zoom,0.5;shadowlength,2
|
||||
SongsOnCommand=horizalign,left;x,20;y,20;diffuse,0.6,0.6,0.6,1;zoom,0.5;shadowlength,2
|
||||
NextScreen=ScreenHowToPlay
|
||||
|
||||
[ScreenHowToPlay]
|
||||
|
||||
@@ -154,3 +154,27 @@ bool AnnouncerManager::HasSoundsFor( CString sFolderName )
|
||||
{
|
||||
return !DirectoryIsEmpty( GetPathTo(sFolderName) );
|
||||
}
|
||||
|
||||
void AnnouncerManager::NextAnnouncer()
|
||||
{
|
||||
CStringArray as;
|
||||
GetAnnouncerNames( as );
|
||||
if( as.size()==0 )
|
||||
return;
|
||||
|
||||
if( m_sCurAnnouncerName == "" )
|
||||
SwitchAnnouncer( as[0] );
|
||||
else
|
||||
{
|
||||
for( unsigned i=0; i<as.size(); i++ )
|
||||
if( as[i].CompareNoCase(m_sCurAnnouncerName)==0 )
|
||||
break;
|
||||
if( i==as.size()-1 )
|
||||
SwitchAnnouncer( "" );
|
||||
else
|
||||
{
|
||||
int iNewIndex = (i+1)%as.size();
|
||||
SwitchAnnouncer( as[iNewIndex] );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,6 +24,7 @@ public:
|
||||
bool DoesAnnouncerExist( CString sAnnouncerName );
|
||||
void SwitchAnnouncer( CString sNewAnnouncerName );
|
||||
CString GetCurAnnouncerName() { return m_sCurAnnouncerName; };
|
||||
void NextAnnouncer();
|
||||
|
||||
CString GetPathTo( CString sFolderName );
|
||||
bool HasSoundsFor( CString sFolderName );
|
||||
|
||||
@@ -19,33 +19,7 @@
|
||||
#include "StyleDef.h"
|
||||
#include "RageUtil.h"
|
||||
|
||||
enum Code {
|
||||
CODE_EASIER1,
|
||||
CODE_EASIER2,
|
||||
CODE_HARDER1,
|
||||
CODE_HARDER2,
|
||||
CODE_NEXT_SORT1,
|
||||
CODE_NEXT_SORT2,
|
||||
CODE_MIRROR,
|
||||
CODE_LEFT,
|
||||
CODE_RIGHT,
|
||||
CODE_SHUFFLE,
|
||||
CODE_SUPER_SHUFFLE,
|
||||
CODE_NEXT_TRANSFORM,
|
||||
CODE_NEXT_SCROLL_SPEED,
|
||||
CODE_PREVIOUS_SCROLL_SPEED,
|
||||
CODE_NEXT_ACCEL,
|
||||
CODE_NEXT_EFFECT,
|
||||
CODE_NEXT_APPEARANCE,
|
||||
CODE_NEXT_TURN,
|
||||
CODE_REVERSE,
|
||||
CODE_HOLDS,
|
||||
CODE_DARK,
|
||||
CODE_CANCEL_ALL,
|
||||
NUM_CODES // leave this at the end
|
||||
};
|
||||
|
||||
const CString g_sCodeNames[NUM_CODES] = {
|
||||
const CString g_sCodeNames[CodeDetector::NUM_CODES] = {
|
||||
"Easier1",
|
||||
"Easier2",
|
||||
"Harder1",
|
||||
@@ -67,17 +41,21 @@ const CString g_sCodeNames[NUM_CODES] = {
|
||||
"Reverse",
|
||||
"HoldNotes",
|
||||
"Dark",
|
||||
"CancelAll"
|
||||
"CancelAll",
|
||||
"NextTheme",
|
||||
"NextAnnouncer"
|
||||
};
|
||||
|
||||
const int MAX_CODE_LENGTH = 10;
|
||||
|
||||
struct CodeCacheItem {
|
||||
int iNumButtons;
|
||||
GameButton buttons[10];
|
||||
GameButton buttons[MAX_CODE_LENGTH];
|
||||
};
|
||||
CodeCacheItem g_CodeCacheItems[NUM_CODES];
|
||||
CodeCacheItem g_CodeCacheItems[CodeDetector::NUM_CODES];
|
||||
|
||||
|
||||
bool MatchesCacheItem( GameController controller, Code code )
|
||||
bool CodeDetector::EnteredCode( GameController controller, Code code )
|
||||
{
|
||||
if( g_CodeCacheItems[code].iNumButtons > 0 )
|
||||
if( INPUTQUEUE->MatchesPattern(controller, g_CodeCacheItems[code].buttons, g_CodeCacheItems[code].iNumButtons) )
|
||||
@@ -102,7 +80,7 @@ void RefreshCacheItem( int iIndex )
|
||||
return;
|
||||
}
|
||||
|
||||
for( unsigned i=0; i<asButtonNames.size(); i++ ) // for each button in this code
|
||||
for( unsigned i=0; i<asButtonNames.size() && i<MAX_CODE_LENGTH; i++ ) // for each button in this code
|
||||
{
|
||||
CString sButtonName = asButtonNames[i];
|
||||
|
||||
@@ -137,17 +115,17 @@ void CodeDetector::RefreshCacheItems()
|
||||
|
||||
bool CodeDetector::EnteredEasierDifficulty( GameController controller )
|
||||
{
|
||||
return MatchesCacheItem(controller,CODE_EASIER1) || MatchesCacheItem(controller,CODE_EASIER2);
|
||||
return EnteredCode(controller,CODE_EASIER1) || EnteredCode(controller,CODE_EASIER2);
|
||||
}
|
||||
|
||||
bool CodeDetector::EnteredHarderDifficulty( GameController controller )
|
||||
{
|
||||
return MatchesCacheItem(controller,CODE_HARDER1) || MatchesCacheItem(controller,CODE_HARDER2);
|
||||
return EnteredCode(controller,CODE_HARDER1) || EnteredCode(controller,CODE_HARDER2);
|
||||
}
|
||||
|
||||
bool CodeDetector::EnteredNextSort( GameController controller )
|
||||
{
|
||||
return MatchesCacheItem(controller,CODE_NEXT_SORT1) || MatchesCacheItem(controller,CODE_NEXT_SORT2);
|
||||
return EnteredCode(controller,CODE_NEXT_SORT1) || EnteredCode(controller,CODE_NEXT_SORT2);
|
||||
}
|
||||
|
||||
#define TOGGLE(v,a,b) if(v!=a) v=a; else v=b;
|
||||
@@ -155,16 +133,16 @@ bool CodeDetector::EnteredNextSort( GameController controller )
|
||||
#define INCREMENT_SCROLL_SPEED(s) (s==0.5f) ? s=0.75f : (s==0.75f) ? s=1.0f : (s==1.0f) ? s=1.5f : (s==1.5f) ? s=2.0f : (s==2.0f) ? s=3.0f : (s==3.0f) ? s=4.0f : (s==4.0f) ? s=5.0f : (s==5.0f) ? s=8.0f : s=0.5f;
|
||||
#define DECREMENT_SCROLL_SPEED(s) (s==0.75f) ? s=0.5f : (s==1.0f) ? s=0.75f : (s==1.5f) ? s=1.0f : (s==2.0f) ? s=1.5f : (s==3.0f) ? s=2.0f : (s==4.0f) ? s=3.0f : (s==5.0f) ? s=4.0f : (s==8.0f) ? s=4.0f : s=8.0f;
|
||||
|
||||
bool CodeDetector::DetectAndAdjustOptions( GameController controller )
|
||||
bool CodeDetector::DetectAndAdjustMusicOptions( GameController controller )
|
||||
{
|
||||
const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef();
|
||||
PlayerNumber pn = pStyleDef->ControllerToPlayerNumber( controller );
|
||||
|
||||
for( int c=CODE_MIRROR; c<NUM_CODES; c++ )
|
||||
for( int c=0; c<CodeDetector::NUM_CODES; c++ )
|
||||
{
|
||||
Code code = (Code)c;
|
||||
|
||||
if( MatchesCacheItem(controller,code) )
|
||||
if( EnteredCode(controller,code) )
|
||||
{
|
||||
switch( code )
|
||||
{
|
||||
|
||||
@@ -16,11 +16,40 @@
|
||||
class CodeDetector
|
||||
{
|
||||
public:
|
||||
enum Code {
|
||||
CODE_EASIER1,
|
||||
CODE_EASIER2,
|
||||
CODE_HARDER1,
|
||||
CODE_HARDER2,
|
||||
CODE_NEXT_SORT1,
|
||||
CODE_NEXT_SORT2,
|
||||
CODE_MIRROR,
|
||||
CODE_LEFT,
|
||||
CODE_RIGHT,
|
||||
CODE_SHUFFLE,
|
||||
CODE_SUPER_SHUFFLE,
|
||||
CODE_NEXT_TRANSFORM,
|
||||
CODE_NEXT_SCROLL_SPEED,
|
||||
CODE_PREVIOUS_SCROLL_SPEED,
|
||||
CODE_NEXT_ACCEL,
|
||||
CODE_NEXT_EFFECT,
|
||||
CODE_NEXT_APPEARANCE,
|
||||
CODE_NEXT_TURN,
|
||||
CODE_REVERSE,
|
||||
CODE_HOLDS,
|
||||
CODE_DARK,
|
||||
CODE_CANCEL_ALL,
|
||||
CODE_NEXT_THEME,
|
||||
CODE_NEXT_ANNOUNCER,
|
||||
NUM_CODES // leave this at the end
|
||||
};
|
||||
|
||||
static void RefreshCacheItems(); // call this before checking codes, but call infrequently
|
||||
static bool EnteredEasierDifficulty( GameController controller );
|
||||
static bool EnteredHarderDifficulty( GameController controller );
|
||||
static bool EnteredNextSort( GameController controller );
|
||||
static bool DetectAndAdjustOptions( GameController controller );
|
||||
static bool DetectAndAdjustMusicOptions( GameController controller );
|
||||
static bool EnteredCode( GameController controller, Code code );
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -83,3 +83,14 @@ RankingCategory AverageMeterToRankingCategory( float fAverageMeter )
|
||||
|
||||
}
|
||||
|
||||
CString CoinModeToString( CoinMode cm )
|
||||
{
|
||||
switch( cm )
|
||||
{
|
||||
case COIN_HOME: return "home";
|
||||
case COIN_PAY: return "pay";
|
||||
case COIN_FREE: return "free";
|
||||
case COIN_EVENT: return "event";
|
||||
default: ASSERT(0); return "";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -215,4 +215,13 @@ const CString RANDOMMOVIES_DIR = "RandomMovies/";
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Coin stuff
|
||||
//
|
||||
|
||||
enum CoinMode { COIN_HOME, COIN_PAY, COIN_FREE, COIN_EVENT, NUM_COIN_MODES };
|
||||
|
||||
CString CoinModeToString( CoinMode cm );
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -154,14 +154,14 @@ int GameState::GetNumStagesLeft()
|
||||
{
|
||||
if(GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2())
|
||||
return 1;
|
||||
if(PREFSMAN->m_bEventMode)
|
||||
if(PREFSMAN->m_iCoinMode==COIN_EVENT)
|
||||
return 999;
|
||||
return PREFSMAN->m_iNumArcadeStages - m_iCurrentStageIndex;
|
||||
}
|
||||
|
||||
bool GameState::IsFinalStage()
|
||||
{
|
||||
if( PREFSMAN->m_bEventMode )
|
||||
if( PREFSMAN->m_iCoinMode==COIN_EVENT )
|
||||
return false;
|
||||
int iPredictedStageForCurSong = 1;
|
||||
if( m_pCurSong != NULL )
|
||||
@@ -172,14 +172,14 @@ bool GameState::IsFinalStage()
|
||||
|
||||
bool GameState::IsExtraStage()
|
||||
{
|
||||
if( PREFSMAN->m_bEventMode )
|
||||
if( PREFSMAN->m_iCoinMode==COIN_EVENT )
|
||||
return false;
|
||||
return m_iCurrentStageIndex == PREFSMAN->m_iNumArcadeStages;
|
||||
}
|
||||
|
||||
bool GameState::IsExtraStage2()
|
||||
{
|
||||
if( PREFSMAN->m_bEventMode )
|
||||
if( PREFSMAN->m_iCoinMode==COIN_EVENT )
|
||||
return false;
|
||||
return m_iCurrentStageIndex == PREFSMAN->m_iNumArcadeStages+1;
|
||||
}
|
||||
@@ -190,7 +190,7 @@ CString GameState::GetStageText()
|
||||
else if( m_PlayMode == PLAY_MODE_ONI ) return "oni";
|
||||
else if( m_PlayMode == PLAY_MODE_NONSTOP ) return "nonstop";
|
||||
else if( m_PlayMode == PLAY_MODE_ENDLESS ) return "endless";
|
||||
else if( PREFSMAN->m_bEventMode ) return "event";
|
||||
else if( PREFSMAN->m_iCoinMode==COIN_EVENT ) return "event";
|
||||
else if( IsFinalStage() ) return "final";
|
||||
else if( IsExtraStage() ) return "extra1";
|
||||
else if( IsExtraStage2() ) return "extra2";
|
||||
@@ -299,7 +299,7 @@ bool GameState::IsCourseMode() const
|
||||
|
||||
bool GameState::HasEarnedExtraStage()
|
||||
{
|
||||
if( PREFSMAN->m_bEventMode )
|
||||
if( PREFSMAN->m_iCoinMode==COIN_EVENT )
|
||||
return false;
|
||||
|
||||
if( GAMESTATE->m_PlayMode != PLAY_MODE_ARCADE )
|
||||
|
||||
@@ -163,6 +163,9 @@ void Player::Update( float fDeltaTime )
|
||||
{
|
||||
//LOG->Trace( "Player::Update(%f)", fDeltaTime );
|
||||
|
||||
if( GAMESTATE->m_pCurSong==NULL )
|
||||
return;
|
||||
|
||||
const float fSongBeat = GAMESTATE->m_fSongBeat;
|
||||
|
||||
//
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "GameDef.h"
|
||||
#include "AnnouncerManager.h"
|
||||
#include "ThemeManager.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "arch/arch.h" /* for default driver specs */
|
||||
|
||||
|
||||
@@ -52,7 +53,6 @@ PrefsManager::PrefsManager()
|
||||
m_bShowDanger = true;
|
||||
m_fBGBrightness = 0.8f;
|
||||
m_bMenuTimer = true;
|
||||
m_bEventMode = false;
|
||||
m_iNumArcadeStages = 3;
|
||||
m_bAutoPlay = false;
|
||||
m_fJudgeWindowScale = 1.0f;
|
||||
@@ -73,13 +73,12 @@ PrefsManager::PrefsManager()
|
||||
m_bArcadeOptionsNavigation = false;
|
||||
m_bSoloSingle = false; // OFF!!!!
|
||||
m_iUnloadTextureDelaySeconds = 0; // disabled 60*30; // 30 mins
|
||||
m_bCoinOpMode = false;
|
||||
m_MusicWheelUsesSections = ALWAYS;
|
||||
m_iMusicWheelSwitchSpeed = 10;
|
||||
m_bChangeBannersWhenFast = false;
|
||||
m_bEasterEggs = true;
|
||||
m_bMarvelousTiming = true;
|
||||
m_CoinMode = COIN_HOME;
|
||||
m_iCoinMode = COIN_HOME;
|
||||
m_iCoinsPerCredit = 1;
|
||||
m_bJointPremium = false;
|
||||
m_iBoostAppPriority = -1;
|
||||
@@ -143,7 +142,6 @@ void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame )
|
||||
ini.GetValueB( "Options", "ShowDanger", m_bShowDanger );
|
||||
ini.GetValueF( "Options", "BGBrightness", m_fBGBrightness );
|
||||
ini.GetValueB( "Options", "MenuTimer", m_bMenuTimer );
|
||||
ini.GetValueB( "Options", "EventMode", m_bEventMode );
|
||||
ini.GetValueI( "Options", "NumArcadeStages", m_iNumArcadeStages );
|
||||
ini.GetValueB( "Options", "AutoPlay", m_bAutoPlay );
|
||||
ini.GetValueF( "Options", "JudgeWindowScale", m_fJudgeWindowScale );
|
||||
@@ -166,7 +164,6 @@ void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame )
|
||||
ini.GetValueB( "Options", "ArcadeOptionsNavigation", m_bArcadeOptionsNavigation );
|
||||
ini.GetValue ( "Options", "DWIPath", m_DWIPath );
|
||||
ini.GetValueI( "Options", "UnloadTextureDelaySeconds", m_iUnloadTextureDelaySeconds );
|
||||
ini.GetValueB( "Options", "CoinOpMode", m_bCoinOpMode );
|
||||
ini.GetValueI( "Options", "MusicWheelUsesSections", (int&)m_MusicWheelUsesSections );
|
||||
ini.GetValueI( "Options", "MusicWheelSwitchSpeed", m_iMusicWheelSwitchSpeed );
|
||||
ini.GetValueB( "Options", "ChangeBannersWhenFast", m_bChangeBannersWhenFast );
|
||||
@@ -175,7 +172,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame )
|
||||
ini.GetValueB( "Options", "MarvelousTiming", m_bMarvelousTiming );
|
||||
ini.GetValueF( "Options", "SoundVolume", m_fSoundVolume );
|
||||
ini.GetValueB( "Options", "SoundPreloadAll", m_bSoundPreloadAll );
|
||||
ini.GetValueI( "Options", "CoinMode", (int&)m_CoinMode );
|
||||
ini.GetValueI( "Options", "CoinMode", m_iCoinMode );
|
||||
ini.GetValueI( "Options", "CoinsPerCredit", m_iCoinsPerCredit );
|
||||
ini.GetValueB( "Options", "JointPremium", m_bJointPremium );
|
||||
ini.GetValueI( "Options", "BoostAppPriority", m_iBoostAppPriority );
|
||||
@@ -226,7 +223,6 @@ void PrefsManager::SaveGlobalPrefsToDisk()
|
||||
ini.SetValueI( "Options", "BackgroundMode", m_BackgroundMode);
|
||||
ini.SetValueB( "Options", "ShowDanger", m_bShowDanger );
|
||||
ini.SetValueF( "Options", "BGBrightness", m_fBGBrightness );
|
||||
ini.SetValueB( "Options", "EventMode", m_bEventMode );
|
||||
ini.SetValueB( "Options", "MenuTimer", m_bMenuTimer );
|
||||
ini.SetValueI( "Options", "NumArcadeStages", m_iNumArcadeStages );
|
||||
ini.SetValueB( "Options", "AutoPlay", m_bAutoPlay );
|
||||
@@ -256,7 +252,7 @@ void PrefsManager::SaveGlobalPrefsToDisk()
|
||||
ini.SetValueB( "Options", "EasterEggs", m_bEasterEggs );
|
||||
ini.SetValueB( "Options", "MarvelousTiming", m_bMarvelousTiming );
|
||||
ini.SetValueB( "Options", "SoundPreloadAll", m_bSoundPreloadAll );
|
||||
ini.SetValueI( "Options", "CoinMode", (int&)m_CoinMode );
|
||||
ini.SetValueI( "Options", "CoinMode", m_iCoinMode );
|
||||
ini.SetValueI( "Options", "CoinsPerCredit", m_iCoinsPerCredit );
|
||||
ini.SetValueB( "Options", "JointPremium", m_bJointPremium );
|
||||
ini.SetValueI( "Options", "BoostAppPriority", m_iBoostAppPriority );
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
Chris Gomez
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
#include "SongOptions.h"
|
||||
|
||||
class PrefsManager
|
||||
{
|
||||
@@ -41,7 +40,6 @@ public:
|
||||
bool m_bMenuTimer;
|
||||
bool m_bShowDanger;
|
||||
int m_iNumArcadeStages;
|
||||
bool m_bEventMode;
|
||||
float m_fJudgeWindowScale;
|
||||
float m_fLifeDifficultyScale;
|
||||
float m_fJudgeWindowMarvelousSeconds;
|
||||
@@ -55,13 +53,12 @@ public:
|
||||
bool m_bInstructions, m_bShowDontDie, m_bShowSelectGroup;
|
||||
bool m_bShowTranslations;
|
||||
bool m_bArcadeOptionsNavigation;
|
||||
bool m_bCoinOpMode;
|
||||
enum { NEVER, ALWAYS, ABC_ONLY } m_MusicWheelUsesSections;
|
||||
int m_iMusicWheelSwitchSpeed;
|
||||
bool m_bChangeBannersWhenFast;
|
||||
bool m_bEasterEggs;
|
||||
bool m_bMarvelousTiming;
|
||||
enum { COIN_HOME, COIN_PAY, COIN_FREE, NUM_COIN_MODES } m_CoinMode;
|
||||
int m_iCoinMode;
|
||||
int m_iCoinsPerCredit;
|
||||
bool m_bJointPremium;
|
||||
bool m_bPickExtraStage;
|
||||
|
||||
@@ -1283,3 +1283,12 @@ CString Basename(CString dir)
|
||||
}
|
||||
|
||||
|
||||
CString Capitalize( CString s )
|
||||
{
|
||||
if( s.GetLength()==0 )
|
||||
return "";
|
||||
CString s1 = s.Left(1);
|
||||
s1.MakeUpper();
|
||||
CString s2 = s.Right( s.GetLength()-1 );
|
||||
return s1+s2;
|
||||
}
|
||||
|
||||
@@ -248,6 +248,8 @@ CString WcharDisplayText(wchar_t c);
|
||||
|
||||
CString Basename(CString dir);
|
||||
|
||||
CString Capitalize( CString s );
|
||||
|
||||
#ifndef WIN32
|
||||
#include <unistd.h> /* correct place with correct definitions */
|
||||
#endif
|
||||
|
||||
@@ -136,18 +136,14 @@ bool Screen::ChangeCoinModeInput( const DeviceInput& DeviceI, const InputEventTy
|
||||
return false;
|
||||
if( DeviceI.device == DEVICE_KEYBOARD && DeviceI.button == SDLK_F3 )
|
||||
{
|
||||
(int&)PREFSMAN->m_CoinMode = (PREFSMAN->m_CoinMode+1) % PrefsManager::NUM_COIN_MODES;
|
||||
(int&)PREFSMAN->m_iCoinMode = (PREFSMAN->m_iCoinMode+1) % NUM_COIN_MODES;
|
||||
/* ResetGame();
|
||||
This causes problems on ScreenIntroMovie, which results in the
|
||||
movie being restarted and/or becoming out-of-synch -- Miryokuteki */
|
||||
|
||||
CString sMessage = "Coin Mode: ";
|
||||
switch( PREFSMAN->m_CoinMode )
|
||||
{
|
||||
case PrefsManager::COIN_HOME: sMessage += "HOME"; break;
|
||||
case PrefsManager::COIN_PAY: sMessage += "PAY"; break;
|
||||
case PrefsManager::COIN_FREE: sMessage += "FREE"; break;
|
||||
}
|
||||
CString sMessage = CoinModeToString( (CoinMode)PREFSMAN->m_iCoinMode );
|
||||
sMessage.MakeUpper();
|
||||
sMessage = "Coin Mode: " + sMessage;
|
||||
SCREENMAN->RefreshCreditsMessages();
|
||||
SCREENMAN->SystemMessage( sMessage );
|
||||
return true;
|
||||
@@ -168,7 +164,7 @@ bool Screen::JoinInput( const DeviceInput& DeviceI, const InputEventType type, c
|
||||
|
||||
/* subtract coins */
|
||||
int iCoinsToCharge = 0;
|
||||
if( PREFSMAN->m_CoinMode == PrefsManager::COIN_PAY )
|
||||
if( PREFSMAN->m_iCoinMode == COIN_PAY )
|
||||
iCoinsToCharge = PREFSMAN->m_iCoinsPerCredit;
|
||||
|
||||
if( PREFSMAN->m_bJointPremium )
|
||||
|
||||
@@ -97,7 +97,7 @@ void ScreenAppearanceOptions::ImportOptions()
|
||||
// fill in theme names
|
||||
//
|
||||
CStringArray arrayThemeNames;
|
||||
THEME->GetThemeNamesForCurGame( arrayThemeNames );
|
||||
THEME->GetThemeNames( arrayThemeNames );
|
||||
|
||||
m_OptionRow[AO_THEME].choices.clear();
|
||||
|
||||
|
||||
@@ -88,14 +88,15 @@ void ScreenAttract::AttractInput( const DeviceInput& DeviceI, const InputEventTy
|
||||
case MENU_BUTTON_START:
|
||||
case MENU_BUTTON_BACK:
|
||||
case MENU_BUTTON_COIN:
|
||||
switch( PREFSMAN->m_CoinMode )
|
||||
switch( PREFSMAN->m_iCoinMode )
|
||||
{
|
||||
case PrefsManager::COIN_PAY:
|
||||
case COIN_PAY:
|
||||
if( GAMESTATE->m_iCoins < PREFSMAN->m_iCoinsPerCredit )
|
||||
break; // don't fall through
|
||||
// fall through
|
||||
case PrefsManager::COIN_FREE:
|
||||
case PrefsManager::COIN_HOME:
|
||||
case COIN_HOME:
|
||||
case COIN_FREE:
|
||||
case COIN_EVENT:
|
||||
SOUNDMAN->StopMusic();
|
||||
/* We already played the it was a coin was inserted. Don't play it again. */
|
||||
if( MenuI.button != MENU_BUTTON_COIN )
|
||||
|
||||
@@ -93,7 +93,7 @@ void ScreenDemonstration::Input( const DeviceInput& DeviceI, const InputEventTyp
|
||||
case MENU_BUTTON_START:
|
||||
case MENU_BUTTON_BACK:
|
||||
|
||||
if( PREFSMAN->m_CoinMode == PrefsManager::COIN_PAY )
|
||||
if( PREFSMAN->m_iCoinMode == COIN_PAY )
|
||||
if( GAMESTATE->m_iCoins < PREFSMAN->m_iCoinsPerCredit )
|
||||
break; // don't fall through
|
||||
m_soundMusic.Stop();
|
||||
|
||||
@@ -773,7 +773,7 @@ void ScreenEvaluation::MenuStart( PlayerNumber pn )
|
||||
m_Grades[p].SettleImmediately();
|
||||
|
||||
|
||||
if( PREFSMAN->m_bEventMode )
|
||||
if( PREFSMAN->m_iCoinMode==COIN_EVENT )
|
||||
{
|
||||
switch( GAMESTATE->m_PlayMode )
|
||||
{
|
||||
|
||||
@@ -195,7 +195,7 @@ void ScreenEz2SelectMusic::Input( const DeviceInput& DeviceI, const InputEventTy
|
||||
HarderDifficulty( pn );
|
||||
return;
|
||||
}
|
||||
if( CodeDetector::DetectAndAdjustOptions(GameI.controller) )
|
||||
if( CodeDetector::DetectAndAdjustMusicOptions(GameI.controller) )
|
||||
{
|
||||
UpdateOptions(pn,1);
|
||||
}
|
||||
|
||||
@@ -1541,7 +1541,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
|
||||
case PLAY_MODE_ARCADE:
|
||||
case PLAY_MODE_BATTLE:
|
||||
case PLAY_MODE_RAVE:
|
||||
if( PREFSMAN->m_bEventMode )
|
||||
if( PREFSMAN->m_iCoinMode==COIN_EVENT )
|
||||
HandleScreenMessage( SM_GoToScreenAfterBack );
|
||||
else if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
|
||||
SCREENMAN->SetNewScreen( "ScreenEvaluationSummary" );
|
||||
|
||||
@@ -69,6 +69,7 @@ ScreenHowToPlay::ScreenHowToPlay() : ScreenAttract("ScreenHowToPlay")
|
||||
ScreenHowToPlay::~ScreenHowToPlay()
|
||||
{
|
||||
delete m_pSong;
|
||||
GAMESTATE->m_pCurSong = NULL;
|
||||
}
|
||||
|
||||
void ScreenHowToPlay::Update( float fDelta )
|
||||
|
||||
@@ -22,18 +22,9 @@
|
||||
#include "PrefsManager.h"
|
||||
|
||||
|
||||
#define HELP_TEXT THEME->GetMetric("ScreenInstructions","HelpText")
|
||||
#define TIMER_SECONDS THEME->GetMetricI("ScreenInstructions","TimerSeconds")
|
||||
CString Capitalize( CString s )
|
||||
{
|
||||
if( s.GetLength()==0 )
|
||||
return "";
|
||||
CString s1 = s.Left(1);
|
||||
s1.MakeUpper();
|
||||
CString s2 = s.Right( s.GetLength()-1 );
|
||||
return s1+s2;
|
||||
}
|
||||
#define NEXT_SCREEN( pm ) THEME->GetMetric("ScreenInstructions","NextScreen"+Capitalize(PlayModeToString(pm)) )
|
||||
#define HELP_TEXT THEME->GetMetric("ScreenInstructions","HelpText")
|
||||
#define TIMER_SECONDS THEME->GetMetricI("ScreenInstructions","TimerSeconds")
|
||||
#define NEXT_SCREEN( pm ) THEME->GetMetric("ScreenInstructions","NextScreen"+Capitalize(PlayModeToString(pm)) )
|
||||
|
||||
|
||||
ScreenInstructions::ScreenInstructions() : Screen("ScreenInstructions")
|
||||
|
||||
@@ -178,14 +178,15 @@ void ScreenJukebox::Input( const DeviceInput& DeviceI, const InputEventType type
|
||||
case MENU_BUTTON_START:
|
||||
case MENU_BUTTON_BACK:
|
||||
case MENU_BUTTON_COIN:
|
||||
switch( PREFSMAN->m_CoinMode )
|
||||
switch( PREFSMAN->m_iCoinMode )
|
||||
{
|
||||
case PrefsManager::COIN_PAY:
|
||||
case COIN_PAY:
|
||||
if( GAMESTATE->m_iCoins < PREFSMAN->m_iCoinsPerCredit )
|
||||
break; // don't fall through
|
||||
// fall through
|
||||
case PrefsManager::COIN_FREE:
|
||||
case PrefsManager::COIN_HOME:
|
||||
case COIN_HOME:
|
||||
case COIN_FREE:
|
||||
case COIN_EVENT:
|
||||
SOUNDMAN->StopMusic();
|
||||
/* We already played the it was a coin was inserted. Don't play it again. */
|
||||
if( MenuI.button != MENU_BUTTON_COIN )
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
#include "SongManager.h"
|
||||
|
||||
#define LOGO_ON_COMMAND THEME->GetMetric("ScreenLogo","LogoOnCommand")
|
||||
#define VERSION_ON_COMMAND THEME->GetMetric("ScreenLogo","VersionOnCommand")
|
||||
#define SONGS_ON_COMMAND THEME->GetMetric("ScreenLogo","SongsOnCommand")
|
||||
|
||||
|
||||
ScreenLogo::ScreenLogo() : ScreenAttract("ScreenLogo")
|
||||
@@ -28,17 +26,6 @@ ScreenLogo::ScreenLogo() : ScreenAttract("ScreenLogo")
|
||||
m_sprLogo.Command( LOGO_ON_COMMAND );
|
||||
this->AddChild( &m_sprLogo );
|
||||
|
||||
m_textVersion.LoadFromFont( THEME->GetPathToF("Common normal") );
|
||||
m_textVersion.Command( VERSION_ON_COMMAND );
|
||||
m_textVersion.SetText( "CVS" );
|
||||
this->AddChild( &m_textVersion );
|
||||
|
||||
|
||||
m_textSongs.LoadFromFont( THEME->GetPathToF("Common normal") );
|
||||
m_textSongs.Command( SONGS_ON_COMMAND );
|
||||
m_textSongs.SetText( ssprintf("%d songs in %d groups, %d courses", SONGMAN->GetNumSongs(), SONGMAN->GetNumGroups(), SONGMAN->GetNumCourses()) );
|
||||
this->AddChild( &m_textSongs );
|
||||
|
||||
this->MoveToTail( &m_In ); // put it in the back so it covers up the stuff we just added
|
||||
this->MoveToTail( &m_Out ); // put it in the back so it covers up the stuff we just added
|
||||
}
|
||||
|
||||
@@ -21,9 +21,6 @@ public:
|
||||
|
||||
protected:
|
||||
Sprite m_sprLogo;
|
||||
|
||||
BitmapText m_textVersion;
|
||||
BitmapText m_textSongs;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -27,12 +27,12 @@
|
||||
|
||||
enum {
|
||||
MO_MENU_TIMER,
|
||||
MO_COIN_MODE,
|
||||
MO_NUM_ARCADE_STAGES,
|
||||
MO_JUDGE_DIFFICULTY,
|
||||
MO_LIFE_DIFFICULTY,
|
||||
MO_FAIL,
|
||||
MO_SHOWSTATS,
|
||||
MO_COIN_MODE,
|
||||
MO_COINS_PER_CREDIT,
|
||||
MO_JOINT_PREMIUM,
|
||||
MO_SHOW_SONG_OPTIONS,
|
||||
@@ -41,12 +41,12 @@ enum {
|
||||
|
||||
OptionRow g_MachineOptionsLines[NUM_MACHINE_OPTIONS_LINES] = {
|
||||
OptionRow( "Menu\nTimer", "OFF","ON" ),
|
||||
OptionRow( "Arcade\nStages", "1","2","3","4","5","6","7","UNLIMITED" ),
|
||||
OptionRow( "Coin\nMode", "HOME","PAY","FREE PLAY","EVENT MODE" ),
|
||||
OptionRow( "Songs Per\nPlay", "1","2","3","4","5","6","7" ),
|
||||
OptionRow( "Judge\nDifficulty", "1","2","3","4","5","6","7","8" ),
|
||||
OptionRow( "Life\nDifficulty", "1","2","3","4","5","6","7" ),
|
||||
OptionRow( "Default\nFail Type", "ARCADE","END OF SONG","OFF" ),
|
||||
OptionRow( "Show\nStats", "OFF","ON" ),
|
||||
OptionRow( "Coin\nMode", "HOME","PAY","FREE PLAY" ),
|
||||
OptionRow( "Coins Per\nCredit", "1","2","3","4","5","6","7","8" ),
|
||||
OptionRow( "Joint\nPremium", "OFF","ON" ),
|
||||
OptionRow( "Song\nOptions", "HIDE","ALLOW" ),
|
||||
@@ -69,8 +69,9 @@ ScreenMachineOptions::ScreenMachineOptions() :
|
||||
|
||||
void ScreenMachineOptions::ImportOptions()
|
||||
{
|
||||
m_iSelectedOption[0][MO_COIN_MODE] = PREFSMAN->m_iCoinMode;
|
||||
m_iSelectedOption[0][MO_MENU_TIMER] = PREFSMAN->m_bMenuTimer ? 1:0;
|
||||
m_iSelectedOption[0][MO_NUM_ARCADE_STAGES] = PREFSMAN->m_bEventMode ? 7 : PREFSMAN->m_iNumArcadeStages - 1;
|
||||
m_iSelectedOption[0][MO_NUM_ARCADE_STAGES] = PREFSMAN->m_iNumArcadeStages - 1;
|
||||
|
||||
/* .02 difficulty is beyond our timing right now; even autoplay
|
||||
* misses! At least fix autoplay before enabling this, or we'll
|
||||
@@ -103,7 +104,6 @@ void ScreenMachineOptions::ImportOptions()
|
||||
so.FromString( PREFSMAN->m_sDefaultModifiers );
|
||||
m_iSelectedOption[0][MO_FAIL] = so.m_FailType;
|
||||
m_iSelectedOption[0][MO_SHOWSTATS] = PREFSMAN->m_bShowStats ? 1:0;
|
||||
m_iSelectedOption[0][MO_COIN_MODE] = PREFSMAN->m_CoinMode;
|
||||
m_iSelectedOption[0][MO_COINS_PER_CREDIT] = PREFSMAN->m_iCoinsPerCredit - 1;
|
||||
m_iSelectedOption[0][MO_JOINT_PREMIUM] = PREFSMAN->m_bJointPremium ? 1:0;
|
||||
m_iSelectedOption[0][MO_SHOW_SONG_OPTIONS] = PREFSMAN->m_bShowSongOptions ? 1:0;
|
||||
@@ -111,8 +111,8 @@ void ScreenMachineOptions::ImportOptions()
|
||||
|
||||
void ScreenMachineOptions::ExportOptions()
|
||||
{
|
||||
PREFSMAN->m_iCoinMode = m_iSelectedOption[0][MO_COIN_MODE];
|
||||
PREFSMAN->m_bMenuTimer = m_iSelectedOption[0][MO_MENU_TIMER] == 1;
|
||||
PREFSMAN->m_bEventMode = m_iSelectedOption[0][MO_NUM_ARCADE_STAGES] == 7;
|
||||
PREFSMAN->m_iNumArcadeStages = m_iSelectedOption[0][MO_NUM_ARCADE_STAGES] + 1;
|
||||
|
||||
switch( m_iSelectedOption[0][MO_JUDGE_DIFFICULTY] )
|
||||
@@ -160,7 +160,6 @@ void ScreenMachineOptions::ExportOptions()
|
||||
as.push_back( so.GetString() );
|
||||
PREFSMAN->m_sDefaultModifiers = join(", ",as);
|
||||
PREFSMAN->m_bShowStats = m_iSelectedOption[0][MO_SHOWSTATS] == 1;
|
||||
(int&)PREFSMAN->m_CoinMode = m_iSelectedOption[0][MO_COIN_MODE];
|
||||
PREFSMAN->m_iCoinsPerCredit = m_iSelectedOption[0][MO_COINS_PER_CREDIT] + 1;
|
||||
PREFSMAN->m_bJointPremium = m_iSelectedOption[0][MO_JOINT_PREMIUM] == 1;
|
||||
PREFSMAN->m_bShowSongOptions = (bool&)m_iSelectedOption[0][MO_SHOW_SONG_OPTIONS];
|
||||
|
||||
@@ -149,9 +149,9 @@ void ScreenSystemLayer::RefreshCreditsMessages()
|
||||
// update joined
|
||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||
{
|
||||
switch( PREFSMAN->m_CoinMode )
|
||||
switch( PREFSMAN->m_iCoinMode )
|
||||
{
|
||||
case PrefsManager::COIN_HOME:
|
||||
case COIN_HOME:
|
||||
if( GAMESTATE->m_bSideIsJoined[p] )
|
||||
m_textCreditInfo[p].SetText( "" );
|
||||
else if( GAMESTATE->m_bPlayersCanJoin ) // would (GAMESTATE->m_CurStyle!=STYLE_INVALID) do the same thing?
|
||||
@@ -159,7 +159,7 @@ void ScreenSystemLayer::RefreshCreditsMessages()
|
||||
else
|
||||
m_textCreditInfo[p].SetText( "NOT PRESENT" );
|
||||
break;
|
||||
case PrefsManager::COIN_PAY:
|
||||
case COIN_PAY:
|
||||
{
|
||||
int Coins = GAMESTATE->m_iCoins % PREFSMAN->m_iCoinsPerCredit;
|
||||
CString txt = ssprintf("CREDIT(S) %d", GAMESTATE->m_iCoins / PREFSMAN->m_iCoinsPerCredit);
|
||||
@@ -168,9 +168,12 @@ void ScreenSystemLayer::RefreshCreditsMessages()
|
||||
m_textCreditInfo[p].SetText(txt);
|
||||
}
|
||||
break;
|
||||
case PrefsManager::COIN_FREE:
|
||||
case COIN_FREE:
|
||||
m_textCreditInfo[p].SetText( "FREE PLAY" );
|
||||
break;
|
||||
case COIN_EVENT:
|
||||
m_textCreditInfo[p].SetText( "EVENT MODE" );
|
||||
break;
|
||||
default:
|
||||
ASSERT(0);
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ void ScreenSelect::Input( const DeviceInput& DeviceI, const InputEventType type,
|
||||
/* Joint premium on a DDR machine does allow two player modes with a single
|
||||
* credit. -Chris */
|
||||
|
||||
if( PREFSMAN->m_CoinMode == PrefsManager::COIN_PAY )
|
||||
if( PREFSMAN->m_iCoinMode == COIN_PAY )
|
||||
{
|
||||
if( !PREFSMAN->m_bJointPremium )
|
||||
{
|
||||
|
||||
@@ -246,7 +246,7 @@ void ScreenSelectCourse::Input( const DeviceInput& DeviceI, InputEventType type,
|
||||
if( m_bMadeChoice )
|
||||
return;
|
||||
|
||||
if( CodeDetector::DetectAndAdjustOptions(GameI.controller) )
|
||||
if( CodeDetector::DetectAndAdjustMusicOptions(GameI.controller) )
|
||||
{
|
||||
m_soundOptionsChange.Play();
|
||||
UpdateOptionsDisplays();
|
||||
|
||||
@@ -418,7 +418,7 @@ void ScreenSelectMusic::Input( const DeviceInput& DeviceI, InputEventType type,
|
||||
}
|
||||
return;
|
||||
}
|
||||
if( !GAMESTATE->IsExtraStage() && !GAMESTATE->IsExtraStage2() && CodeDetector::DetectAndAdjustOptions(GameI.controller) )
|
||||
if( !GAMESTATE->IsExtraStage() && !GAMESTATE->IsExtraStage2() && CodeDetector::DetectAndAdjustMusicOptions(GameI.controller) )
|
||||
{
|
||||
m_soundOptionsChange.Play();
|
||||
UpdateOptionsDisplays();
|
||||
@@ -496,7 +496,7 @@ void ScreenSelectMusic::AdjustOptions()
|
||||
/* If beginner's steps were chosen, and this is the first stage,
|
||||
* turn off failure completely--always give a second try. */
|
||||
if(dc == DIFFICULTY_BEGINNER &&
|
||||
!PREFSMAN->m_bEventMode && /* stage index is meaningless in event mode */
|
||||
PREFSMAN->m_iCoinMode!=COIN_EVENT && /* stage index is meaningless in event mode */
|
||||
GAMESTATE->m_iCurrentStageIndex == 0)
|
||||
ft = SongOptions::FAIL_OFF;
|
||||
// Redundant. -Chris
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
|
||||
#include "ScreenTitleMenu.h"
|
||||
#include "ScreenAttract.h"
|
||||
#include "ScreenManager.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "RageUtil.h"
|
||||
@@ -25,8 +26,13 @@
|
||||
#include "ThemeManager.h"
|
||||
#include "SDL_utils.h"
|
||||
#include "RageSoundManager.h"
|
||||
#include "CodeDetector.h"
|
||||
|
||||
|
||||
#define LOGO_ON_COMMAND THEME->GetMetric("ScreenTitleMenu","LogoOnCommand")
|
||||
#define LOGO_HOME_ON_COMMAND THEME->GetMetric("ScreenTitleMenu","LogoHomeOnCommand")
|
||||
#define VERSION_ON_COMMAND THEME->GetMetric("ScreenTitleMenu","VersionOnCommand")
|
||||
#define SONGS_ON_COMMAND THEME->GetMetric("ScreenTitleMenu","SongsOnCommand")
|
||||
#define HELP_X THEME->GetMetricF("ScreenTitleMenu","HelpX")
|
||||
#define HELP_Y THEME->GetMetricF("ScreenTitleMenu","HelpY")
|
||||
#define CHOICES_X THEME->GetMetricF("ScreenTitleMenu","ChoicesX")
|
||||
@@ -39,53 +45,52 @@
|
||||
#define ZOOM_SELECTED THEME->GetMetricF("ScreenTitleMenu","ZoomSelected")
|
||||
#define SECONDS_BETWEEN_COMMENTS THEME->GetMetricF("ScreenTitleMenu","SecondsBetweenComments")
|
||||
#define SECONDS_BEFORE_ATTRACT THEME->GetMetricF("ScreenTitleMenu","SecondsBeforeAttract")
|
||||
#define HELP_TEXT_HOME THEME->GetMetric("ScreenTitleMenu","HelpTextHome")
|
||||
#define HELP_TEXT_PAY THEME->GetMetric("ScreenTitleMenu","HelpTextPay")
|
||||
#define HELP_TEXT_FREE THEME->GetMetric("ScreenTitleMenu","HelpTextFree")
|
||||
#define HELP_TEXT( coin_mode ) THEME->GetMetric("ScreenTitleMenu","HelpText"+Capitalize(CoinModeToString(coin_mode)))
|
||||
#define NEXT_SCREEN THEME->GetMetric("ScreenTitleMenu","NextScreen")
|
||||
|
||||
const ScreenMessage SM_PlayComment = ScreenMessage(SM_User+1);
|
||||
const ScreenMessage SM_GoToAttractLoop = ScreenMessage(SM_User+13);
|
||||
|
||||
ScreenTitleMenu::ScreenTitleMenu()
|
||||
ScreenTitleMenu::ScreenTitleMenu() : Screen("ScreenTitleMenu")
|
||||
{
|
||||
LOG->Trace( "ScreenTitleMenu::ScreenTitleMenu()" );
|
||||
|
||||
GAMESTATE->m_bPlayersCanJoin = true;
|
||||
|
||||
if( PREFSMAN->m_CoinMode!=PrefsManager::COIN_HOME && PREFSMAN->m_bJointPremium )
|
||||
CodeDetector::RefreshCacheItems();
|
||||
|
||||
if( PREFSMAN->m_iCoinMode!=COIN_HOME && PREFSMAN->m_bJointPremium )
|
||||
{
|
||||
m_JointPremium.LoadFromAniDir( THEME->GetPathToB("ScreenTitleMenu joint premium") );
|
||||
this->AddChild( &m_JointPremium );
|
||||
}
|
||||
|
||||
switch( PREFSMAN->m_CoinMode )
|
||||
{
|
||||
case PrefsManager::COIN_HOME:
|
||||
// do nothing
|
||||
break;
|
||||
case PrefsManager::COIN_PAY:
|
||||
m_CoinMode.LoadFromAniDir( THEME->GetPathToB("ScreenTitleMenu pay") );
|
||||
this->AddChild( &m_CoinMode );
|
||||
break;
|
||||
case PrefsManager::COIN_FREE:
|
||||
m_CoinMode.LoadFromAniDir( THEME->GetPathToB("ScreenTitleMenu free") );
|
||||
this->AddChild( &m_CoinMode );
|
||||
break;
|
||||
default:
|
||||
ASSERT(0);
|
||||
}
|
||||
|
||||
m_Background.LoadFromAniDir( THEME->GetPathToB("ScreenTitleMenu background") );
|
||||
this->AddChild( &m_Background );
|
||||
|
||||
m_sprLogo.Load( THEME->GetPathToG(ssprintf("ScreenLogo %s",GAMESTATE->GetCurrentGameDef()->m_szName)) );
|
||||
m_sprLogo.Command( PREFSMAN->m_iCoinMode==COIN_HOME ? LOGO_HOME_ON_COMMAND : LOGO_ON_COMMAND );
|
||||
this->AddChild( &m_sprLogo );
|
||||
|
||||
m_textVersion.LoadFromFont( THEME->GetPathToF("Common normal") );
|
||||
m_textVersion.Command( VERSION_ON_COMMAND );
|
||||
m_textVersion.SetText( "CVS" );
|
||||
this->AddChild( &m_textVersion );
|
||||
|
||||
|
||||
m_textSongs.LoadFromFont( THEME->GetPathToF("Common normal") );
|
||||
m_textSongs.Command( SONGS_ON_COMMAND );
|
||||
m_textSongs.SetText( ssprintf("%d songs in %d groups, %d courses", SONGMAN->GetNumSongs(), SONGMAN->GetNumGroups(), SONGMAN->GetNumCourses()) );
|
||||
this->AddChild( &m_textSongs );
|
||||
|
||||
|
||||
CString sCoinMode = CoinModeToString((CoinMode)PREFSMAN->m_iCoinMode);
|
||||
m_CoinMode.LoadFromAniDir( THEME->GetPathToB("ScreenTitleMenu "+sCoinMode) );
|
||||
this->AddChild( &m_CoinMode );
|
||||
|
||||
m_textHelp.LoadFromFont( THEME->GetPathToF("ScreenTitleMenu help") );
|
||||
CString sHelpText;
|
||||
switch( PREFSMAN->m_CoinMode )
|
||||
{
|
||||
case PrefsManager::COIN_HOME: sHelpText = HELP_TEXT_HOME; break;
|
||||
case PrefsManager::COIN_PAY: sHelpText = HELP_TEXT_PAY; break;
|
||||
case PrefsManager::COIN_FREE: sHelpText = HELP_TEXT_FREE; break;
|
||||
default: ASSERT(0);
|
||||
}
|
||||
m_textHelp.SetText( sHelpText );
|
||||
m_textHelp.SetText( HELP_TEXT((CoinMode)PREFSMAN->m_iCoinMode) );
|
||||
m_textHelp.SetXY( HELP_X, HELP_Y );
|
||||
m_textHelp.SetZoom( 0.5f );
|
||||
m_textHelp.SetEffectDiffuseBlink();
|
||||
@@ -93,9 +98,9 @@ ScreenTitleMenu::ScreenTitleMenu()
|
||||
m_textHelp.SetShadowLength( 2 );
|
||||
this->AddChild( &m_textHelp );
|
||||
|
||||
switch( PREFSMAN->m_CoinMode )
|
||||
switch( PREFSMAN->m_iCoinMode )
|
||||
{
|
||||
case PrefsManager::COIN_HOME:
|
||||
case COIN_HOME:
|
||||
int i;
|
||||
for( i=0; i<NUM_CHOICES; i++ )
|
||||
{
|
||||
@@ -107,15 +112,23 @@ ScreenTitleMenu::ScreenTitleMenu()
|
||||
this->AddChild( &m_textChoice[i] );
|
||||
}
|
||||
break;
|
||||
case PrefsManager::COIN_PAY:
|
||||
break;
|
||||
case PrefsManager::COIN_FREE:
|
||||
case COIN_PAY:
|
||||
case COIN_FREE:
|
||||
case COIN_EVENT:
|
||||
break;
|
||||
default:
|
||||
ASSERT(0);
|
||||
}
|
||||
|
||||
|
||||
m_In.Load( THEME->GetPathToB("ScreenTitleMenu in") );
|
||||
m_In.StartTransitioning();
|
||||
this->AddChild( &m_In );
|
||||
|
||||
m_Out.Load( THEME->GetPathToB("ScreenTitleMenu out") );
|
||||
this->AddChild( &m_Out );
|
||||
|
||||
|
||||
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("title menu game name") );
|
||||
|
||||
|
||||
@@ -164,7 +177,7 @@ void ScreenTitleMenu::Input( const DeviceInput& DeviceI, const InputEventType ty
|
||||
switch( MenuI.button )
|
||||
{
|
||||
case MENU_BUTTON_UP:
|
||||
if( PREFSMAN->m_CoinMode != PrefsManager::COIN_HOME )
|
||||
if( PREFSMAN->m_iCoinMode != COIN_HOME )
|
||||
break;
|
||||
if( m_In.IsTransitioning() || m_Out.IsTransitioning() )
|
||||
break;
|
||||
@@ -177,7 +190,7 @@ void ScreenTitleMenu::Input( const DeviceInput& DeviceI, const InputEventType ty
|
||||
GainFocus( m_Choice );
|
||||
break;
|
||||
case MENU_BUTTON_DOWN:
|
||||
if( PREFSMAN->m_CoinMode != PrefsManager::COIN_HOME )
|
||||
if( PREFSMAN->m_iCoinMode != COIN_HOME )
|
||||
break;
|
||||
if( m_In.IsTransitioning() || m_Out.IsTransitioning() )
|
||||
break;
|
||||
@@ -220,6 +233,21 @@ void ScreenTitleMenu::Input( const DeviceInput& DeviceI, const InputEventType ty
|
||||
m_Out.StartTransitioning( SM_GoToNextScreen );
|
||||
}
|
||||
|
||||
// detect codes
|
||||
if( CodeDetector::EnteredCode(GameI.controller,CodeDetector::CODE_NEXT_THEME) )
|
||||
{
|
||||
THEME->NextTheme();
|
||||
SCREENMAN->SystemMessage( "Theme: "+THEME->GetCurThemeName() );
|
||||
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
|
||||
}
|
||||
if( CodeDetector::EnteredCode(GameI.controller,CodeDetector::CODE_NEXT_ANNOUNCER) )
|
||||
{
|
||||
ANNOUNCER->NextAnnouncer();
|
||||
CString sName = ANNOUNCER->GetCurAnnouncerName();
|
||||
if( sName=="" ) sName = "(none)";
|
||||
SCREENMAN->SystemMessage( "Announcer: "+sName );
|
||||
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
|
||||
}
|
||||
// Screen::Input( DeviceI, type, GameI, MenuI, StyleI );
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "ScreenLogo.h"
|
||||
#include "Screen.h"
|
||||
#include "Transition.h"
|
||||
#include "Sprite.h"
|
||||
#include "BitmapText.h"
|
||||
#include "RageSound.h"
|
||||
@@ -18,7 +19,7 @@
|
||||
#include "RandomSample.h"
|
||||
|
||||
|
||||
class ScreenTitleMenu : public ScreenLogo
|
||||
class ScreenTitleMenu : public Screen
|
||||
{
|
||||
public:
|
||||
ScreenTitleMenu();
|
||||
@@ -32,8 +33,6 @@ public:
|
||||
{
|
||||
CHOICE_GAME_START = 0,
|
||||
CHOICE_SELECT_GAME,
|
||||
/* At request, moved this into the options/operator menu -- Miryokuteki */
|
||||
//CHOICE_MAP_KEY_JOY,
|
||||
CHOICE_OPTIONS,
|
||||
CHOICE_EDIT,
|
||||
CHOICE_JUKEBOX,
|
||||
@@ -48,9 +47,7 @@ public:
|
||||
{
|
||||
const CString s[NUM_CHOICES] = {
|
||||
"GAME START",
|
||||
"SWITCH GAME",
|
||||
/* At request, moved this into the options/operator menu -- Miryokuteki */
|
||||
//"CONFIG KEY/JOY",
|
||||
"SELECT GAME",
|
||||
"OPTIONS",
|
||||
"EDIT/SYNC SONGS",
|
||||
"JUKEBOX",
|
||||
@@ -69,6 +66,10 @@ private:
|
||||
|
||||
Choice m_Choice;
|
||||
|
||||
BGAnimation m_Background;
|
||||
Sprite m_sprLogo;
|
||||
BitmapText m_textVersion;
|
||||
BitmapText m_textSongs;
|
||||
BitmapText m_textHelp;
|
||||
BitmapText m_textChoice[NUM_CHOICES];
|
||||
|
||||
@@ -81,6 +82,9 @@ private:
|
||||
|
||||
BGAnimation m_CoinMode;
|
||||
BGAnimation m_JointPremium;
|
||||
|
||||
Transition m_In;
|
||||
Transition m_Out;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ ThemeManager::ThemeManager()
|
||||
m_uHashForCurThemeMetrics = m_uHashForBaseThemeMetrics = 0;
|
||||
|
||||
CStringArray arrayThemeNames;
|
||||
GetAllThemeNames( arrayThemeNames );
|
||||
GetThemeNames( arrayThemeNames );
|
||||
}
|
||||
|
||||
ThemeManager::~ThemeManager()
|
||||
@@ -57,7 +57,7 @@ ThemeManager::~ThemeManager()
|
||||
delete m_pIniMetrics;
|
||||
}
|
||||
|
||||
void ThemeManager::GetAllThemeNames( CStringArray& AddTo )
|
||||
void ThemeManager::GetThemeNames( CStringArray& AddTo )
|
||||
{
|
||||
GetDirListing( THEMES_DIR+"/*", AddTo, true );
|
||||
|
||||
@@ -71,28 +71,10 @@ void ThemeManager::GetAllThemeNames( CStringArray& AddTo )
|
||||
}
|
||||
}
|
||||
|
||||
void ThemeManager::GetThemeNamesForCurGame( CStringArray& AddTo )
|
||||
{
|
||||
GetAllThemeNames( AddTo );
|
||||
|
||||
/*
|
||||
// strip out announcers that don't have the current game name in them
|
||||
CString sGameName = GAMESTATE->GetCurrentGameDef()->m_szName;
|
||||
sGameName.MakeLower();
|
||||
for( unsigned i=AddTo.size()-1; i>=0; i-- )
|
||||
{
|
||||
CString sLowercaseVer = AddTo[i];
|
||||
sLowercaseVer.MakeLower();
|
||||
if( sLowercaseVer.Find(sGameName)==-1 )
|
||||
AddTo.RemoveAt(i);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
bool ThemeManager::DoesThemeExist( CString sThemeName )
|
||||
{
|
||||
CStringArray asThemeNames;
|
||||
GetAllThemeNames( asThemeNames );
|
||||
GetThemeNames( asThemeNames );
|
||||
for( unsigned i=0; i<asThemeNames.size(); i++ )
|
||||
{
|
||||
if( !sThemeName.CompareNoCase(asThemeNames[i]) )
|
||||
@@ -381,3 +363,14 @@ RageColor ThemeManager::GetMetricC( CString sClassName, CString sValueName )
|
||||
|
||||
return RageColor(r,g,b,a);
|
||||
}
|
||||
|
||||
void ThemeManager::NextTheme()
|
||||
{
|
||||
CStringArray as;
|
||||
GetThemeNames( as );
|
||||
for( unsigned i=0; i<as.size(); i++ )
|
||||
if( as[i].CompareNoCase(m_sCurThemeName)==0 )
|
||||
break;
|
||||
int iNewIndex = (i+1)%as.size();
|
||||
SwitchTheme( as[iNewIndex] );
|
||||
}
|
||||
@@ -24,10 +24,11 @@ public:
|
||||
ThemeManager();
|
||||
~ThemeManager();
|
||||
|
||||
void GetThemeNamesForCurGame( CStringArray& AddTo );
|
||||
void GetThemeNames( CStringArray& AddTo );
|
||||
bool DoesThemeExist( CString sThemeName );
|
||||
void SwitchTheme( CString sThemeName );
|
||||
CString GetCurThemeName() { return m_sCurThemeName; };
|
||||
void NextTheme();
|
||||
|
||||
CString GetPathTo( ElementCategory category, CString sFileName, bool bOptional=false );
|
||||
CString GetPathToB( CString sFileName ) { return GetPathTo(BGAnimations,sFileName); };
|
||||
@@ -45,7 +46,6 @@ public:
|
||||
RageColor GetMetricC( CString sClassName, CString sValueName );
|
||||
|
||||
protected:
|
||||
void GetAllThemeNames( CStringArray& AddTo );
|
||||
CString GetPathTo( CString sThemeName, ElementCategory category, CString sFileName );
|
||||
static CString GetThemeDirFromName( const CString &sThemeName );
|
||||
CString GetElementDir( CString sThemeName );
|
||||
|
||||
Reference in New Issue
Block a user