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.
|
DefaultModifiers.
|
||||||
NEW FEATURE: Courses can be organized into group folders. See
|
NEW FEATURE: Courses can be organized into group folders. See
|
||||||
README-FIRST.html for details.
|
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 ---------------------------
|
----------------------- Version 3.01 ---------------------------
|
||||||
CHANGE: Simplified NoteSkin tap graphic format. Old NoteSkins will need to
|
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
|
DefaultScrollDirection=0
|
||||||
|
|
||||||
[ScreenTitleMenu]
|
[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
|
ChoicesX=320
|
||||||
ChoicesStartY=92
|
ChoicesStartY=92
|
||||||
ChoicesSpacingY=52
|
ChoicesSpacingY=52
|
||||||
@@ -37,6 +41,7 @@ SecondsBeforeAttract=30
|
|||||||
HelpTextHome=Use &UP; &DOWN; to select, then press START
|
HelpTextHome=Use &UP; &DOWN; to select, then press START
|
||||||
HelpTextPay=Press START to begin
|
HelpTextPay=Press START to begin
|
||||||
HelpTextFree=Press START to begin
|
HelpTextFree=Press START to begin
|
||||||
|
HelpTextEvent=Press START to begin
|
||||||
NextScreen=ScreenCaution
|
NextScreen=ScreenCaution
|
||||||
|
|
||||||
[ScreenCaution]
|
[ScreenCaution]
|
||||||
@@ -1069,6 +1074,8 @@ Reverse=Down,Left,Right,Left,Right
|
|||||||
HoldNotes=Right,Left,Down,Up
|
HoldNotes=Right,Left,Down,Up
|
||||||
Dark=
|
Dark=
|
||||||
CancelAll=Left,Right,Left,Right,Left,Right,Left,Right
|
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]
|
[GrooveRadar]
|
||||||
Label1OffsetX=0 // stream
|
Label1OffsetX=0 // stream
|
||||||
@@ -1119,7 +1126,7 @@ WheelSpeed=Adjusts the speed of the DDR style musicwheel.
|
|||||||
[ScreenMachineOptions]
|
[ScreenMachineOptions]
|
||||||
HelpText=&UP; &DOWN; to change line &LEFT; &RIGHT; to select between options::START to accept changes BACK to discard changes
|
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.
|
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).
|
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.
|
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.
|
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]
|
[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
|
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
|
NextScreen=ScreenHowToPlay
|
||||||
|
|
||||||
[ScreenHowToPlay]
|
[ScreenHowToPlay]
|
||||||
|
|||||||
@@ -154,3 +154,27 @@ bool AnnouncerManager::HasSoundsFor( CString sFolderName )
|
|||||||
{
|
{
|
||||||
return !DirectoryIsEmpty( GetPathTo(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 );
|
bool DoesAnnouncerExist( CString sAnnouncerName );
|
||||||
void SwitchAnnouncer( CString sNewAnnouncerName );
|
void SwitchAnnouncer( CString sNewAnnouncerName );
|
||||||
CString GetCurAnnouncerName() { return m_sCurAnnouncerName; };
|
CString GetCurAnnouncerName() { return m_sCurAnnouncerName; };
|
||||||
|
void NextAnnouncer();
|
||||||
|
|
||||||
CString GetPathTo( CString sFolderName );
|
CString GetPathTo( CString sFolderName );
|
||||||
bool HasSoundsFor( CString sFolderName );
|
bool HasSoundsFor( CString sFolderName );
|
||||||
|
|||||||
@@ -19,33 +19,7 @@
|
|||||||
#include "StyleDef.h"
|
#include "StyleDef.h"
|
||||||
#include "RageUtil.h"
|
#include "RageUtil.h"
|
||||||
|
|
||||||
enum Code {
|
const CString g_sCodeNames[CodeDetector::NUM_CODES] = {
|
||||||
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] = {
|
|
||||||
"Easier1",
|
"Easier1",
|
||||||
"Easier2",
|
"Easier2",
|
||||||
"Harder1",
|
"Harder1",
|
||||||
@@ -67,17 +41,21 @@ const CString g_sCodeNames[NUM_CODES] = {
|
|||||||
"Reverse",
|
"Reverse",
|
||||||
"HoldNotes",
|
"HoldNotes",
|
||||||
"Dark",
|
"Dark",
|
||||||
"CancelAll"
|
"CancelAll",
|
||||||
|
"NextTheme",
|
||||||
|
"NextAnnouncer"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const int MAX_CODE_LENGTH = 10;
|
||||||
|
|
||||||
struct CodeCacheItem {
|
struct CodeCacheItem {
|
||||||
int iNumButtons;
|
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( g_CodeCacheItems[code].iNumButtons > 0 )
|
||||||
if( INPUTQUEUE->MatchesPattern(controller, g_CodeCacheItems[code].buttons, g_CodeCacheItems[code].iNumButtons) )
|
if( INPUTQUEUE->MatchesPattern(controller, g_CodeCacheItems[code].buttons, g_CodeCacheItems[code].iNumButtons) )
|
||||||
@@ -102,7 +80,7 @@ void RefreshCacheItem( int iIndex )
|
|||||||
return;
|
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];
|
CString sButtonName = asButtonNames[i];
|
||||||
|
|
||||||
@@ -137,17 +115,17 @@ void CodeDetector::RefreshCacheItems()
|
|||||||
|
|
||||||
bool CodeDetector::EnteredEasierDifficulty( GameController controller )
|
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 )
|
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 )
|
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;
|
#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 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;
|
#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();
|
const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef();
|
||||||
PlayerNumber pn = pStyleDef->ControllerToPlayerNumber( controller );
|
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;
|
Code code = (Code)c;
|
||||||
|
|
||||||
if( MatchesCacheItem(controller,code) )
|
if( EnteredCode(controller,code) )
|
||||||
{
|
{
|
||||||
switch( code )
|
switch( code )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,11 +16,40 @@
|
|||||||
class CodeDetector
|
class CodeDetector
|
||||||
{
|
{
|
||||||
public:
|
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 void RefreshCacheItems(); // call this before checking codes, but call infrequently
|
||||||
static bool EnteredEasierDifficulty( GameController controller );
|
static bool EnteredEasierDifficulty( GameController controller );
|
||||||
static bool EnteredHarderDifficulty( GameController controller );
|
static bool EnteredHarderDifficulty( GameController controller );
|
||||||
static bool EnteredNextSort( 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
|
#endif
|
||||||
|
|||||||
@@ -154,14 +154,14 @@ int GameState::GetNumStagesLeft()
|
|||||||
{
|
{
|
||||||
if(GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2())
|
if(GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2())
|
||||||
return 1;
|
return 1;
|
||||||
if(PREFSMAN->m_bEventMode)
|
if(PREFSMAN->m_iCoinMode==COIN_EVENT)
|
||||||
return 999;
|
return 999;
|
||||||
return PREFSMAN->m_iNumArcadeStages - m_iCurrentStageIndex;
|
return PREFSMAN->m_iNumArcadeStages - m_iCurrentStageIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GameState::IsFinalStage()
|
bool GameState::IsFinalStage()
|
||||||
{
|
{
|
||||||
if( PREFSMAN->m_bEventMode )
|
if( PREFSMAN->m_iCoinMode==COIN_EVENT )
|
||||||
return false;
|
return false;
|
||||||
int iPredictedStageForCurSong = 1;
|
int iPredictedStageForCurSong = 1;
|
||||||
if( m_pCurSong != NULL )
|
if( m_pCurSong != NULL )
|
||||||
@@ -172,14 +172,14 @@ bool GameState::IsFinalStage()
|
|||||||
|
|
||||||
bool GameState::IsExtraStage()
|
bool GameState::IsExtraStage()
|
||||||
{
|
{
|
||||||
if( PREFSMAN->m_bEventMode )
|
if( PREFSMAN->m_iCoinMode==COIN_EVENT )
|
||||||
return false;
|
return false;
|
||||||
return m_iCurrentStageIndex == PREFSMAN->m_iNumArcadeStages;
|
return m_iCurrentStageIndex == PREFSMAN->m_iNumArcadeStages;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GameState::IsExtraStage2()
|
bool GameState::IsExtraStage2()
|
||||||
{
|
{
|
||||||
if( PREFSMAN->m_bEventMode )
|
if( PREFSMAN->m_iCoinMode==COIN_EVENT )
|
||||||
return false;
|
return false;
|
||||||
return m_iCurrentStageIndex == PREFSMAN->m_iNumArcadeStages+1;
|
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_ONI ) return "oni";
|
||||||
else if( m_PlayMode == PLAY_MODE_NONSTOP ) return "nonstop";
|
else if( m_PlayMode == PLAY_MODE_NONSTOP ) return "nonstop";
|
||||||
else if( m_PlayMode == PLAY_MODE_ENDLESS ) return "endless";
|
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( IsFinalStage() ) return "final";
|
||||||
else if( IsExtraStage() ) return "extra1";
|
else if( IsExtraStage() ) return "extra1";
|
||||||
else if( IsExtraStage2() ) return "extra2";
|
else if( IsExtraStage2() ) return "extra2";
|
||||||
@@ -299,7 +299,7 @@ bool GameState::IsCourseMode() const
|
|||||||
|
|
||||||
bool GameState::HasEarnedExtraStage()
|
bool GameState::HasEarnedExtraStage()
|
||||||
{
|
{
|
||||||
if( PREFSMAN->m_bEventMode )
|
if( PREFSMAN->m_iCoinMode==COIN_EVENT )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if( GAMESTATE->m_PlayMode != PLAY_MODE_ARCADE )
|
if( GAMESTATE->m_PlayMode != PLAY_MODE_ARCADE )
|
||||||
|
|||||||
@@ -163,6 +163,9 @@ void Player::Update( float fDeltaTime )
|
|||||||
{
|
{
|
||||||
//LOG->Trace( "Player::Update(%f)", fDeltaTime );
|
//LOG->Trace( "Player::Update(%f)", fDeltaTime );
|
||||||
|
|
||||||
|
if( GAMESTATE->m_pCurSong==NULL )
|
||||||
|
return;
|
||||||
|
|
||||||
const float fSongBeat = GAMESTATE->m_fSongBeat;
|
const float fSongBeat = GAMESTATE->m_fSongBeat;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
#include "GameDef.h"
|
#include "GameDef.h"
|
||||||
#include "AnnouncerManager.h"
|
#include "AnnouncerManager.h"
|
||||||
#include "ThemeManager.h"
|
#include "ThemeManager.h"
|
||||||
|
#include "GameConstantsAndTypes.h"
|
||||||
#include "arch/arch.h" /* for default driver specs */
|
#include "arch/arch.h" /* for default driver specs */
|
||||||
|
|
||||||
|
|
||||||
@@ -52,7 +53,6 @@ PrefsManager::PrefsManager()
|
|||||||
m_bShowDanger = true;
|
m_bShowDanger = true;
|
||||||
m_fBGBrightness = 0.8f;
|
m_fBGBrightness = 0.8f;
|
||||||
m_bMenuTimer = true;
|
m_bMenuTimer = true;
|
||||||
m_bEventMode = false;
|
|
||||||
m_iNumArcadeStages = 3;
|
m_iNumArcadeStages = 3;
|
||||||
m_bAutoPlay = false;
|
m_bAutoPlay = false;
|
||||||
m_fJudgeWindowScale = 1.0f;
|
m_fJudgeWindowScale = 1.0f;
|
||||||
@@ -73,13 +73,12 @@ PrefsManager::PrefsManager()
|
|||||||
m_bArcadeOptionsNavigation = false;
|
m_bArcadeOptionsNavigation = false;
|
||||||
m_bSoloSingle = false; // OFF!!!!
|
m_bSoloSingle = false; // OFF!!!!
|
||||||
m_iUnloadTextureDelaySeconds = 0; // disabled 60*30; // 30 mins
|
m_iUnloadTextureDelaySeconds = 0; // disabled 60*30; // 30 mins
|
||||||
m_bCoinOpMode = false;
|
|
||||||
m_MusicWheelUsesSections = ALWAYS;
|
m_MusicWheelUsesSections = ALWAYS;
|
||||||
m_iMusicWheelSwitchSpeed = 10;
|
m_iMusicWheelSwitchSpeed = 10;
|
||||||
m_bChangeBannersWhenFast = false;
|
m_bChangeBannersWhenFast = false;
|
||||||
m_bEasterEggs = true;
|
m_bEasterEggs = true;
|
||||||
m_bMarvelousTiming = true;
|
m_bMarvelousTiming = true;
|
||||||
m_CoinMode = COIN_HOME;
|
m_iCoinMode = COIN_HOME;
|
||||||
m_iCoinsPerCredit = 1;
|
m_iCoinsPerCredit = 1;
|
||||||
m_bJointPremium = false;
|
m_bJointPremium = false;
|
||||||
m_iBoostAppPriority = -1;
|
m_iBoostAppPriority = -1;
|
||||||
@@ -143,7 +142,6 @@ void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame )
|
|||||||
ini.GetValueB( "Options", "ShowDanger", m_bShowDanger );
|
ini.GetValueB( "Options", "ShowDanger", m_bShowDanger );
|
||||||
ini.GetValueF( "Options", "BGBrightness", m_fBGBrightness );
|
ini.GetValueF( "Options", "BGBrightness", m_fBGBrightness );
|
||||||
ini.GetValueB( "Options", "MenuTimer", m_bMenuTimer );
|
ini.GetValueB( "Options", "MenuTimer", m_bMenuTimer );
|
||||||
ini.GetValueB( "Options", "EventMode", m_bEventMode );
|
|
||||||
ini.GetValueI( "Options", "NumArcadeStages", m_iNumArcadeStages );
|
ini.GetValueI( "Options", "NumArcadeStages", m_iNumArcadeStages );
|
||||||
ini.GetValueB( "Options", "AutoPlay", m_bAutoPlay );
|
ini.GetValueB( "Options", "AutoPlay", m_bAutoPlay );
|
||||||
ini.GetValueF( "Options", "JudgeWindowScale", m_fJudgeWindowScale );
|
ini.GetValueF( "Options", "JudgeWindowScale", m_fJudgeWindowScale );
|
||||||
@@ -166,7 +164,6 @@ void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame )
|
|||||||
ini.GetValueB( "Options", "ArcadeOptionsNavigation", m_bArcadeOptionsNavigation );
|
ini.GetValueB( "Options", "ArcadeOptionsNavigation", m_bArcadeOptionsNavigation );
|
||||||
ini.GetValue ( "Options", "DWIPath", m_DWIPath );
|
ini.GetValue ( "Options", "DWIPath", m_DWIPath );
|
||||||
ini.GetValueI( "Options", "UnloadTextureDelaySeconds", m_iUnloadTextureDelaySeconds );
|
ini.GetValueI( "Options", "UnloadTextureDelaySeconds", m_iUnloadTextureDelaySeconds );
|
||||||
ini.GetValueB( "Options", "CoinOpMode", m_bCoinOpMode );
|
|
||||||
ini.GetValueI( "Options", "MusicWheelUsesSections", (int&)m_MusicWheelUsesSections );
|
ini.GetValueI( "Options", "MusicWheelUsesSections", (int&)m_MusicWheelUsesSections );
|
||||||
ini.GetValueI( "Options", "MusicWheelSwitchSpeed", m_iMusicWheelSwitchSpeed );
|
ini.GetValueI( "Options", "MusicWheelSwitchSpeed", m_iMusicWheelSwitchSpeed );
|
||||||
ini.GetValueB( "Options", "ChangeBannersWhenFast", m_bChangeBannersWhenFast );
|
ini.GetValueB( "Options", "ChangeBannersWhenFast", m_bChangeBannersWhenFast );
|
||||||
@@ -175,7 +172,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame )
|
|||||||
ini.GetValueB( "Options", "MarvelousTiming", m_bMarvelousTiming );
|
ini.GetValueB( "Options", "MarvelousTiming", m_bMarvelousTiming );
|
||||||
ini.GetValueF( "Options", "SoundVolume", m_fSoundVolume );
|
ini.GetValueF( "Options", "SoundVolume", m_fSoundVolume );
|
||||||
ini.GetValueB( "Options", "SoundPreloadAll", m_bSoundPreloadAll );
|
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.GetValueI( "Options", "CoinsPerCredit", m_iCoinsPerCredit );
|
||||||
ini.GetValueB( "Options", "JointPremium", m_bJointPremium );
|
ini.GetValueB( "Options", "JointPremium", m_bJointPremium );
|
||||||
ini.GetValueI( "Options", "BoostAppPriority", m_iBoostAppPriority );
|
ini.GetValueI( "Options", "BoostAppPriority", m_iBoostAppPriority );
|
||||||
@@ -226,7 +223,6 @@ void PrefsManager::SaveGlobalPrefsToDisk()
|
|||||||
ini.SetValueI( "Options", "BackgroundMode", m_BackgroundMode);
|
ini.SetValueI( "Options", "BackgroundMode", m_BackgroundMode);
|
||||||
ini.SetValueB( "Options", "ShowDanger", m_bShowDanger );
|
ini.SetValueB( "Options", "ShowDanger", m_bShowDanger );
|
||||||
ini.SetValueF( "Options", "BGBrightness", m_fBGBrightness );
|
ini.SetValueF( "Options", "BGBrightness", m_fBGBrightness );
|
||||||
ini.SetValueB( "Options", "EventMode", m_bEventMode );
|
|
||||||
ini.SetValueB( "Options", "MenuTimer", m_bMenuTimer );
|
ini.SetValueB( "Options", "MenuTimer", m_bMenuTimer );
|
||||||
ini.SetValueI( "Options", "NumArcadeStages", m_iNumArcadeStages );
|
ini.SetValueI( "Options", "NumArcadeStages", m_iNumArcadeStages );
|
||||||
ini.SetValueB( "Options", "AutoPlay", m_bAutoPlay );
|
ini.SetValueB( "Options", "AutoPlay", m_bAutoPlay );
|
||||||
@@ -256,7 +252,7 @@ void PrefsManager::SaveGlobalPrefsToDisk()
|
|||||||
ini.SetValueB( "Options", "EasterEggs", m_bEasterEggs );
|
ini.SetValueB( "Options", "EasterEggs", m_bEasterEggs );
|
||||||
ini.SetValueB( "Options", "MarvelousTiming", m_bMarvelousTiming );
|
ini.SetValueB( "Options", "MarvelousTiming", m_bMarvelousTiming );
|
||||||
ini.SetValueB( "Options", "SoundPreloadAll", m_bSoundPreloadAll );
|
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.SetValueI( "Options", "CoinsPerCredit", m_iCoinsPerCredit );
|
||||||
ini.SetValueB( "Options", "JointPremium", m_bJointPremium );
|
ini.SetValueB( "Options", "JointPremium", m_bJointPremium );
|
||||||
ini.SetValueI( "Options", "BoostAppPriority", m_iBoostAppPriority );
|
ini.SetValueI( "Options", "BoostAppPriority", m_iBoostAppPriority );
|
||||||
|
|||||||
@@ -11,7 +11,6 @@
|
|||||||
Chris Gomez
|
Chris Gomez
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
#include "SongOptions.h"
|
|
||||||
|
|
||||||
class PrefsManager
|
class PrefsManager
|
||||||
{
|
{
|
||||||
@@ -41,7 +40,6 @@ public:
|
|||||||
bool m_bMenuTimer;
|
bool m_bMenuTimer;
|
||||||
bool m_bShowDanger;
|
bool m_bShowDanger;
|
||||||
int m_iNumArcadeStages;
|
int m_iNumArcadeStages;
|
||||||
bool m_bEventMode;
|
|
||||||
float m_fJudgeWindowScale;
|
float m_fJudgeWindowScale;
|
||||||
float m_fLifeDifficultyScale;
|
float m_fLifeDifficultyScale;
|
||||||
float m_fJudgeWindowMarvelousSeconds;
|
float m_fJudgeWindowMarvelousSeconds;
|
||||||
@@ -55,13 +53,12 @@ public:
|
|||||||
bool m_bInstructions, m_bShowDontDie, m_bShowSelectGroup;
|
bool m_bInstructions, m_bShowDontDie, m_bShowSelectGroup;
|
||||||
bool m_bShowTranslations;
|
bool m_bShowTranslations;
|
||||||
bool m_bArcadeOptionsNavigation;
|
bool m_bArcadeOptionsNavigation;
|
||||||
bool m_bCoinOpMode;
|
|
||||||
enum { NEVER, ALWAYS, ABC_ONLY } m_MusicWheelUsesSections;
|
enum { NEVER, ALWAYS, ABC_ONLY } m_MusicWheelUsesSections;
|
||||||
int m_iMusicWheelSwitchSpeed;
|
int m_iMusicWheelSwitchSpeed;
|
||||||
bool m_bChangeBannersWhenFast;
|
bool m_bChangeBannersWhenFast;
|
||||||
bool m_bEasterEggs;
|
bool m_bEasterEggs;
|
||||||
bool m_bMarvelousTiming;
|
bool m_bMarvelousTiming;
|
||||||
enum { COIN_HOME, COIN_PAY, COIN_FREE, NUM_COIN_MODES } m_CoinMode;
|
int m_iCoinMode;
|
||||||
int m_iCoinsPerCredit;
|
int m_iCoinsPerCredit;
|
||||||
bool m_bJointPremium;
|
bool m_bJointPremium;
|
||||||
bool m_bPickExtraStage;
|
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 Basename(CString dir);
|
||||||
|
|
||||||
|
CString Capitalize( CString s );
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
#include <unistd.h> /* correct place with correct definitions */
|
#include <unistd.h> /* correct place with correct definitions */
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -136,18 +136,14 @@ bool Screen::ChangeCoinModeInput( const DeviceInput& DeviceI, const InputEventTy
|
|||||||
return false;
|
return false;
|
||||||
if( DeviceI.device == DEVICE_KEYBOARD && DeviceI.button == SDLK_F3 )
|
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();
|
/* ResetGame();
|
||||||
This causes problems on ScreenIntroMovie, which results in the
|
This causes problems on ScreenIntroMovie, which results in the
|
||||||
movie being restarted and/or becoming out-of-synch -- Miryokuteki */
|
movie being restarted and/or becoming out-of-synch -- Miryokuteki */
|
||||||
|
|
||||||
CString sMessage = "Coin Mode: ";
|
CString sMessage = CoinModeToString( (CoinMode)PREFSMAN->m_iCoinMode );
|
||||||
switch( PREFSMAN->m_CoinMode )
|
sMessage.MakeUpper();
|
||||||
{
|
sMessage = "Coin Mode: " + sMessage;
|
||||||
case PrefsManager::COIN_HOME: sMessage += "HOME"; break;
|
|
||||||
case PrefsManager::COIN_PAY: sMessage += "PAY"; break;
|
|
||||||
case PrefsManager::COIN_FREE: sMessage += "FREE"; break;
|
|
||||||
}
|
|
||||||
SCREENMAN->RefreshCreditsMessages();
|
SCREENMAN->RefreshCreditsMessages();
|
||||||
SCREENMAN->SystemMessage( sMessage );
|
SCREENMAN->SystemMessage( sMessage );
|
||||||
return true;
|
return true;
|
||||||
@@ -168,7 +164,7 @@ bool Screen::JoinInput( const DeviceInput& DeviceI, const InputEventType type, c
|
|||||||
|
|
||||||
/* subtract coins */
|
/* subtract coins */
|
||||||
int iCoinsToCharge = 0;
|
int iCoinsToCharge = 0;
|
||||||
if( PREFSMAN->m_CoinMode == PrefsManager::COIN_PAY )
|
if( PREFSMAN->m_iCoinMode == COIN_PAY )
|
||||||
iCoinsToCharge = PREFSMAN->m_iCoinsPerCredit;
|
iCoinsToCharge = PREFSMAN->m_iCoinsPerCredit;
|
||||||
|
|
||||||
if( PREFSMAN->m_bJointPremium )
|
if( PREFSMAN->m_bJointPremium )
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ void ScreenAppearanceOptions::ImportOptions()
|
|||||||
// fill in theme names
|
// fill in theme names
|
||||||
//
|
//
|
||||||
CStringArray arrayThemeNames;
|
CStringArray arrayThemeNames;
|
||||||
THEME->GetThemeNamesForCurGame( arrayThemeNames );
|
THEME->GetThemeNames( arrayThemeNames );
|
||||||
|
|
||||||
m_OptionRow[AO_THEME].choices.clear();
|
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_START:
|
||||||
case MENU_BUTTON_BACK:
|
case MENU_BUTTON_BACK:
|
||||||
case MENU_BUTTON_COIN:
|
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 )
|
if( GAMESTATE->m_iCoins < PREFSMAN->m_iCoinsPerCredit )
|
||||||
break; // don't fall through
|
break; // don't fall through
|
||||||
// fall through
|
// fall through
|
||||||
case PrefsManager::COIN_FREE:
|
case COIN_HOME:
|
||||||
case PrefsManager::COIN_HOME:
|
case COIN_FREE:
|
||||||
|
case COIN_EVENT:
|
||||||
SOUNDMAN->StopMusic();
|
SOUNDMAN->StopMusic();
|
||||||
/* We already played the it was a coin was inserted. Don't play it again. */
|
/* We already played the it was a coin was inserted. Don't play it again. */
|
||||||
if( MenuI.button != MENU_BUTTON_COIN )
|
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_START:
|
||||||
case MENU_BUTTON_BACK:
|
case MENU_BUTTON_BACK:
|
||||||
|
|
||||||
if( PREFSMAN->m_CoinMode == PrefsManager::COIN_PAY )
|
if( PREFSMAN->m_iCoinMode == COIN_PAY )
|
||||||
if( GAMESTATE->m_iCoins < PREFSMAN->m_iCoinsPerCredit )
|
if( GAMESTATE->m_iCoins < PREFSMAN->m_iCoinsPerCredit )
|
||||||
break; // don't fall through
|
break; // don't fall through
|
||||||
m_soundMusic.Stop();
|
m_soundMusic.Stop();
|
||||||
|
|||||||
@@ -773,7 +773,7 @@ void ScreenEvaluation::MenuStart( PlayerNumber pn )
|
|||||||
m_Grades[p].SettleImmediately();
|
m_Grades[p].SettleImmediately();
|
||||||
|
|
||||||
|
|
||||||
if( PREFSMAN->m_bEventMode )
|
if( PREFSMAN->m_iCoinMode==COIN_EVENT )
|
||||||
{
|
{
|
||||||
switch( GAMESTATE->m_PlayMode )
|
switch( GAMESTATE->m_PlayMode )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ void ScreenEz2SelectMusic::Input( const DeviceInput& DeviceI, const InputEventTy
|
|||||||
HarderDifficulty( pn );
|
HarderDifficulty( pn );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if( CodeDetector::DetectAndAdjustOptions(GameI.controller) )
|
if( CodeDetector::DetectAndAdjustMusicOptions(GameI.controller) )
|
||||||
{
|
{
|
||||||
UpdateOptions(pn,1);
|
UpdateOptions(pn,1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1541,7 +1541,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
case PLAY_MODE_ARCADE:
|
case PLAY_MODE_ARCADE:
|
||||||
case PLAY_MODE_BATTLE:
|
case PLAY_MODE_BATTLE:
|
||||||
case PLAY_MODE_RAVE:
|
case PLAY_MODE_RAVE:
|
||||||
if( PREFSMAN->m_bEventMode )
|
if( PREFSMAN->m_iCoinMode==COIN_EVENT )
|
||||||
HandleScreenMessage( SM_GoToScreenAfterBack );
|
HandleScreenMessage( SM_GoToScreenAfterBack );
|
||||||
else if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
|
else if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
|
||||||
SCREENMAN->SetNewScreen( "ScreenEvaluationSummary" );
|
SCREENMAN->SetNewScreen( "ScreenEvaluationSummary" );
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ ScreenHowToPlay::ScreenHowToPlay() : ScreenAttract("ScreenHowToPlay")
|
|||||||
ScreenHowToPlay::~ScreenHowToPlay()
|
ScreenHowToPlay::~ScreenHowToPlay()
|
||||||
{
|
{
|
||||||
delete m_pSong;
|
delete m_pSong;
|
||||||
|
GAMESTATE->m_pCurSong = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenHowToPlay::Update( float fDelta )
|
void ScreenHowToPlay::Update( float fDelta )
|
||||||
|
|||||||
@@ -24,15 +24,6 @@
|
|||||||
|
|
||||||
#define HELP_TEXT THEME->GetMetric("ScreenInstructions","HelpText")
|
#define HELP_TEXT THEME->GetMetric("ScreenInstructions","HelpText")
|
||||||
#define TIMER_SECONDS THEME->GetMetricI("ScreenInstructions","TimerSeconds")
|
#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 NEXT_SCREEN( pm ) THEME->GetMetric("ScreenInstructions","NextScreen"+Capitalize(PlayModeToString(pm)) )
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -178,14 +178,15 @@ void ScreenJukebox::Input( const DeviceInput& DeviceI, const InputEventType type
|
|||||||
case MENU_BUTTON_START:
|
case MENU_BUTTON_START:
|
||||||
case MENU_BUTTON_BACK:
|
case MENU_BUTTON_BACK:
|
||||||
case MENU_BUTTON_COIN:
|
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 )
|
if( GAMESTATE->m_iCoins < PREFSMAN->m_iCoinsPerCredit )
|
||||||
break; // don't fall through
|
break; // don't fall through
|
||||||
// fall through
|
// fall through
|
||||||
case PrefsManager::COIN_FREE:
|
case COIN_HOME:
|
||||||
case PrefsManager::COIN_HOME:
|
case COIN_FREE:
|
||||||
|
case COIN_EVENT:
|
||||||
SOUNDMAN->StopMusic();
|
SOUNDMAN->StopMusic();
|
||||||
/* We already played the it was a coin was inserted. Don't play it again. */
|
/* We already played the it was a coin was inserted. Don't play it again. */
|
||||||
if( MenuI.button != MENU_BUTTON_COIN )
|
if( MenuI.button != MENU_BUTTON_COIN )
|
||||||
|
|||||||
@@ -18,8 +18,6 @@
|
|||||||
#include "SongManager.h"
|
#include "SongManager.h"
|
||||||
|
|
||||||
#define LOGO_ON_COMMAND THEME->GetMetric("ScreenLogo","LogoOnCommand")
|
#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")
|
ScreenLogo::ScreenLogo() : ScreenAttract("ScreenLogo")
|
||||||
@@ -28,17 +26,6 @@ ScreenLogo::ScreenLogo() : ScreenAttract("ScreenLogo")
|
|||||||
m_sprLogo.Command( LOGO_ON_COMMAND );
|
m_sprLogo.Command( LOGO_ON_COMMAND );
|
||||||
this->AddChild( &m_sprLogo );
|
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_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
|
this->MoveToTail( &m_Out ); // put it in the back so it covers up the stuff we just added
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,9 +21,6 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
Sprite m_sprLogo;
|
Sprite m_sprLogo;
|
||||||
|
|
||||||
BitmapText m_textVersion;
|
|
||||||
BitmapText m_textSongs;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -27,12 +27,12 @@
|
|||||||
|
|
||||||
enum {
|
enum {
|
||||||
MO_MENU_TIMER,
|
MO_MENU_TIMER,
|
||||||
|
MO_COIN_MODE,
|
||||||
MO_NUM_ARCADE_STAGES,
|
MO_NUM_ARCADE_STAGES,
|
||||||
MO_JUDGE_DIFFICULTY,
|
MO_JUDGE_DIFFICULTY,
|
||||||
MO_LIFE_DIFFICULTY,
|
MO_LIFE_DIFFICULTY,
|
||||||
MO_FAIL,
|
MO_FAIL,
|
||||||
MO_SHOWSTATS,
|
MO_SHOWSTATS,
|
||||||
MO_COIN_MODE,
|
|
||||||
MO_COINS_PER_CREDIT,
|
MO_COINS_PER_CREDIT,
|
||||||
MO_JOINT_PREMIUM,
|
MO_JOINT_PREMIUM,
|
||||||
MO_SHOW_SONG_OPTIONS,
|
MO_SHOW_SONG_OPTIONS,
|
||||||
@@ -41,12 +41,12 @@ enum {
|
|||||||
|
|
||||||
OptionRow g_MachineOptionsLines[NUM_MACHINE_OPTIONS_LINES] = {
|
OptionRow g_MachineOptionsLines[NUM_MACHINE_OPTIONS_LINES] = {
|
||||||
OptionRow( "Menu\nTimer", "OFF","ON" ),
|
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( "Judge\nDifficulty", "1","2","3","4","5","6","7","8" ),
|
||||||
OptionRow( "Life\nDifficulty", "1","2","3","4","5","6","7" ),
|
OptionRow( "Life\nDifficulty", "1","2","3","4","5","6","7" ),
|
||||||
OptionRow( "Default\nFail Type", "ARCADE","END OF SONG","OFF" ),
|
OptionRow( "Default\nFail Type", "ARCADE","END OF SONG","OFF" ),
|
||||||
OptionRow( "Show\nStats", "OFF","ON" ),
|
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( "Coins Per\nCredit", "1","2","3","4","5","6","7","8" ),
|
||||||
OptionRow( "Joint\nPremium", "OFF","ON" ),
|
OptionRow( "Joint\nPremium", "OFF","ON" ),
|
||||||
OptionRow( "Song\nOptions", "HIDE","ALLOW" ),
|
OptionRow( "Song\nOptions", "HIDE","ALLOW" ),
|
||||||
@@ -69,8 +69,9 @@ ScreenMachineOptions::ScreenMachineOptions() :
|
|||||||
|
|
||||||
void ScreenMachineOptions::ImportOptions()
|
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_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
|
/* .02 difficulty is beyond our timing right now; even autoplay
|
||||||
* misses! At least fix autoplay before enabling this, or we'll
|
* misses! At least fix autoplay before enabling this, or we'll
|
||||||
@@ -103,7 +104,6 @@ void ScreenMachineOptions::ImportOptions()
|
|||||||
so.FromString( PREFSMAN->m_sDefaultModifiers );
|
so.FromString( PREFSMAN->m_sDefaultModifiers );
|
||||||
m_iSelectedOption[0][MO_FAIL] = so.m_FailType;
|
m_iSelectedOption[0][MO_FAIL] = so.m_FailType;
|
||||||
m_iSelectedOption[0][MO_SHOWSTATS] = PREFSMAN->m_bShowStats ? 1:0;
|
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_COINS_PER_CREDIT] = PREFSMAN->m_iCoinsPerCredit - 1;
|
||||||
m_iSelectedOption[0][MO_JOINT_PREMIUM] = PREFSMAN->m_bJointPremium ? 1:0;
|
m_iSelectedOption[0][MO_JOINT_PREMIUM] = PREFSMAN->m_bJointPremium ? 1:0;
|
||||||
m_iSelectedOption[0][MO_SHOW_SONG_OPTIONS] = PREFSMAN->m_bShowSongOptions ? 1:0;
|
m_iSelectedOption[0][MO_SHOW_SONG_OPTIONS] = PREFSMAN->m_bShowSongOptions ? 1:0;
|
||||||
@@ -111,8 +111,8 @@ void ScreenMachineOptions::ImportOptions()
|
|||||||
|
|
||||||
void ScreenMachineOptions::ExportOptions()
|
void ScreenMachineOptions::ExportOptions()
|
||||||
{
|
{
|
||||||
|
PREFSMAN->m_iCoinMode = m_iSelectedOption[0][MO_COIN_MODE];
|
||||||
PREFSMAN->m_bMenuTimer = m_iSelectedOption[0][MO_MENU_TIMER] == 1;
|
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;
|
PREFSMAN->m_iNumArcadeStages = m_iSelectedOption[0][MO_NUM_ARCADE_STAGES] + 1;
|
||||||
|
|
||||||
switch( m_iSelectedOption[0][MO_JUDGE_DIFFICULTY] )
|
switch( m_iSelectedOption[0][MO_JUDGE_DIFFICULTY] )
|
||||||
@@ -160,7 +160,6 @@ void ScreenMachineOptions::ExportOptions()
|
|||||||
as.push_back( so.GetString() );
|
as.push_back( so.GetString() );
|
||||||
PREFSMAN->m_sDefaultModifiers = join(", ",as);
|
PREFSMAN->m_sDefaultModifiers = join(", ",as);
|
||||||
PREFSMAN->m_bShowStats = m_iSelectedOption[0][MO_SHOWSTATS] == 1;
|
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_iCoinsPerCredit = m_iSelectedOption[0][MO_COINS_PER_CREDIT] + 1;
|
||||||
PREFSMAN->m_bJointPremium = m_iSelectedOption[0][MO_JOINT_PREMIUM] == 1;
|
PREFSMAN->m_bJointPremium = m_iSelectedOption[0][MO_JOINT_PREMIUM] == 1;
|
||||||
PREFSMAN->m_bShowSongOptions = (bool&)m_iSelectedOption[0][MO_SHOW_SONG_OPTIONS];
|
PREFSMAN->m_bShowSongOptions = (bool&)m_iSelectedOption[0][MO_SHOW_SONG_OPTIONS];
|
||||||
|
|||||||
@@ -149,9 +149,9 @@ void ScreenSystemLayer::RefreshCreditsMessages()
|
|||||||
// update joined
|
// update joined
|
||||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
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] )
|
if( GAMESTATE->m_bSideIsJoined[p] )
|
||||||
m_textCreditInfo[p].SetText( "" );
|
m_textCreditInfo[p].SetText( "" );
|
||||||
else if( GAMESTATE->m_bPlayersCanJoin ) // would (GAMESTATE->m_CurStyle!=STYLE_INVALID) do the same thing?
|
else if( GAMESTATE->m_bPlayersCanJoin ) // would (GAMESTATE->m_CurStyle!=STYLE_INVALID) do the same thing?
|
||||||
@@ -159,7 +159,7 @@ void ScreenSystemLayer::RefreshCreditsMessages()
|
|||||||
else
|
else
|
||||||
m_textCreditInfo[p].SetText( "NOT PRESENT" );
|
m_textCreditInfo[p].SetText( "NOT PRESENT" );
|
||||||
break;
|
break;
|
||||||
case PrefsManager::COIN_PAY:
|
case COIN_PAY:
|
||||||
{
|
{
|
||||||
int Coins = GAMESTATE->m_iCoins % PREFSMAN->m_iCoinsPerCredit;
|
int Coins = GAMESTATE->m_iCoins % PREFSMAN->m_iCoinsPerCredit;
|
||||||
CString txt = ssprintf("CREDIT(S) %d", 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);
|
m_textCreditInfo[p].SetText(txt);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PrefsManager::COIN_FREE:
|
case COIN_FREE:
|
||||||
m_textCreditInfo[p].SetText( "FREE PLAY" );
|
m_textCreditInfo[p].SetText( "FREE PLAY" );
|
||||||
break;
|
break;
|
||||||
|
case COIN_EVENT:
|
||||||
|
m_textCreditInfo[p].SetText( "EVENT MODE" );
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
ASSERT(0);
|
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
|
/* Joint premium on a DDR machine does allow two player modes with a single
|
||||||
* credit. -Chris */
|
* credit. -Chris */
|
||||||
|
|
||||||
if( PREFSMAN->m_CoinMode == PrefsManager::COIN_PAY )
|
if( PREFSMAN->m_iCoinMode == COIN_PAY )
|
||||||
{
|
{
|
||||||
if( !PREFSMAN->m_bJointPremium )
|
if( !PREFSMAN->m_bJointPremium )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -246,7 +246,7 @@ void ScreenSelectCourse::Input( const DeviceInput& DeviceI, InputEventType type,
|
|||||||
if( m_bMadeChoice )
|
if( m_bMadeChoice )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( CodeDetector::DetectAndAdjustOptions(GameI.controller) )
|
if( CodeDetector::DetectAndAdjustMusicOptions(GameI.controller) )
|
||||||
{
|
{
|
||||||
m_soundOptionsChange.Play();
|
m_soundOptionsChange.Play();
|
||||||
UpdateOptionsDisplays();
|
UpdateOptionsDisplays();
|
||||||
|
|||||||
@@ -418,7 +418,7 @@ void ScreenSelectMusic::Input( const DeviceInput& DeviceI, InputEventType type,
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if( !GAMESTATE->IsExtraStage() && !GAMESTATE->IsExtraStage2() && CodeDetector::DetectAndAdjustOptions(GameI.controller) )
|
if( !GAMESTATE->IsExtraStage() && !GAMESTATE->IsExtraStage2() && CodeDetector::DetectAndAdjustMusicOptions(GameI.controller) )
|
||||||
{
|
{
|
||||||
m_soundOptionsChange.Play();
|
m_soundOptionsChange.Play();
|
||||||
UpdateOptionsDisplays();
|
UpdateOptionsDisplays();
|
||||||
@@ -496,7 +496,7 @@ void ScreenSelectMusic::AdjustOptions()
|
|||||||
/* If beginner's steps were chosen, and this is the first stage,
|
/* If beginner's steps were chosen, and this is the first stage,
|
||||||
* turn off failure completely--always give a second try. */
|
* turn off failure completely--always give a second try. */
|
||||||
if(dc == DIFFICULTY_BEGINNER &&
|
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)
|
GAMESTATE->m_iCurrentStageIndex == 0)
|
||||||
ft = SongOptions::FAIL_OFF;
|
ft = SongOptions::FAIL_OFF;
|
||||||
// Redundant. -Chris
|
// Redundant. -Chris
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ScreenTitleMenu.h"
|
#include "ScreenTitleMenu.h"
|
||||||
|
#include "ScreenAttract.h"
|
||||||
#include "ScreenManager.h"
|
#include "ScreenManager.h"
|
||||||
#include "GameConstantsAndTypes.h"
|
#include "GameConstantsAndTypes.h"
|
||||||
#include "RageUtil.h"
|
#include "RageUtil.h"
|
||||||
@@ -25,8 +26,13 @@
|
|||||||
#include "ThemeManager.h"
|
#include "ThemeManager.h"
|
||||||
#include "SDL_utils.h"
|
#include "SDL_utils.h"
|
||||||
#include "RageSoundManager.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_X THEME->GetMetricF("ScreenTitleMenu","HelpX")
|
||||||
#define HELP_Y THEME->GetMetricF("ScreenTitleMenu","HelpY")
|
#define HELP_Y THEME->GetMetricF("ScreenTitleMenu","HelpY")
|
||||||
#define CHOICES_X THEME->GetMetricF("ScreenTitleMenu","ChoicesX")
|
#define CHOICES_X THEME->GetMetricF("ScreenTitleMenu","ChoicesX")
|
||||||
@@ -39,53 +45,52 @@
|
|||||||
#define ZOOM_SELECTED THEME->GetMetricF("ScreenTitleMenu","ZoomSelected")
|
#define ZOOM_SELECTED THEME->GetMetricF("ScreenTitleMenu","ZoomSelected")
|
||||||
#define SECONDS_BETWEEN_COMMENTS THEME->GetMetricF("ScreenTitleMenu","SecondsBetweenComments")
|
#define SECONDS_BETWEEN_COMMENTS THEME->GetMetricF("ScreenTitleMenu","SecondsBetweenComments")
|
||||||
#define SECONDS_BEFORE_ATTRACT THEME->GetMetricF("ScreenTitleMenu","SecondsBeforeAttract")
|
#define SECONDS_BEFORE_ATTRACT THEME->GetMetricF("ScreenTitleMenu","SecondsBeforeAttract")
|
||||||
#define HELP_TEXT_HOME THEME->GetMetric("ScreenTitleMenu","HelpTextHome")
|
#define HELP_TEXT( coin_mode ) THEME->GetMetric("ScreenTitleMenu","HelpText"+Capitalize(CoinModeToString(coin_mode)))
|
||||||
#define HELP_TEXT_PAY THEME->GetMetric("ScreenTitleMenu","HelpTextPay")
|
|
||||||
#define HELP_TEXT_FREE THEME->GetMetric("ScreenTitleMenu","HelpTextFree")
|
|
||||||
#define NEXT_SCREEN THEME->GetMetric("ScreenTitleMenu","NextScreen")
|
#define NEXT_SCREEN THEME->GetMetric("ScreenTitleMenu","NextScreen")
|
||||||
|
|
||||||
const ScreenMessage SM_PlayComment = ScreenMessage(SM_User+1);
|
const ScreenMessage SM_PlayComment = ScreenMessage(SM_User+1);
|
||||||
const ScreenMessage SM_GoToAttractLoop = ScreenMessage(SM_User+13);
|
const ScreenMessage SM_GoToAttractLoop = ScreenMessage(SM_User+13);
|
||||||
|
|
||||||
ScreenTitleMenu::ScreenTitleMenu()
|
ScreenTitleMenu::ScreenTitleMenu() : Screen("ScreenTitleMenu")
|
||||||
{
|
{
|
||||||
LOG->Trace( "ScreenTitleMenu::ScreenTitleMenu()" );
|
LOG->Trace( "ScreenTitleMenu::ScreenTitleMenu()" );
|
||||||
|
|
||||||
GAMESTATE->m_bPlayersCanJoin = true;
|
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") );
|
m_JointPremium.LoadFromAniDir( THEME->GetPathToB("ScreenTitleMenu joint premium") );
|
||||||
this->AddChild( &m_JointPremium );
|
this->AddChild( &m_JointPremium );
|
||||||
}
|
}
|
||||||
|
|
||||||
switch( PREFSMAN->m_CoinMode )
|
|
||||||
{
|
m_Background.LoadFromAniDir( THEME->GetPathToB("ScreenTitleMenu background") );
|
||||||
case PrefsManager::COIN_HOME:
|
this->AddChild( &m_Background );
|
||||||
// do nothing
|
|
||||||
break;
|
m_sprLogo.Load( THEME->GetPathToG(ssprintf("ScreenLogo %s",GAMESTATE->GetCurrentGameDef()->m_szName)) );
|
||||||
case PrefsManager::COIN_PAY:
|
m_sprLogo.Command( PREFSMAN->m_iCoinMode==COIN_HOME ? LOGO_HOME_ON_COMMAND : LOGO_ON_COMMAND );
|
||||||
m_CoinMode.LoadFromAniDir( THEME->GetPathToB("ScreenTitleMenu pay") );
|
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 );
|
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_textHelp.LoadFromFont( THEME->GetPathToF("ScreenTitleMenu help") );
|
m_textHelp.LoadFromFont( THEME->GetPathToF("ScreenTitleMenu help") );
|
||||||
CString sHelpText;
|
m_textHelp.SetText( HELP_TEXT((CoinMode)PREFSMAN->m_iCoinMode) );
|
||||||
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.SetXY( HELP_X, HELP_Y );
|
m_textHelp.SetXY( HELP_X, HELP_Y );
|
||||||
m_textHelp.SetZoom( 0.5f );
|
m_textHelp.SetZoom( 0.5f );
|
||||||
m_textHelp.SetEffectDiffuseBlink();
|
m_textHelp.SetEffectDiffuseBlink();
|
||||||
@@ -93,9 +98,9 @@ ScreenTitleMenu::ScreenTitleMenu()
|
|||||||
m_textHelp.SetShadowLength( 2 );
|
m_textHelp.SetShadowLength( 2 );
|
||||||
this->AddChild( &m_textHelp );
|
this->AddChild( &m_textHelp );
|
||||||
|
|
||||||
switch( PREFSMAN->m_CoinMode )
|
switch( PREFSMAN->m_iCoinMode )
|
||||||
{
|
{
|
||||||
case PrefsManager::COIN_HOME:
|
case COIN_HOME:
|
||||||
int i;
|
int i;
|
||||||
for( i=0; i<NUM_CHOICES; i++ )
|
for( i=0; i<NUM_CHOICES; i++ )
|
||||||
{
|
{
|
||||||
@@ -107,15 +112,23 @@ ScreenTitleMenu::ScreenTitleMenu()
|
|||||||
this->AddChild( &m_textChoice[i] );
|
this->AddChild( &m_textChoice[i] );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PrefsManager::COIN_PAY:
|
case COIN_PAY:
|
||||||
break;
|
case COIN_FREE:
|
||||||
case PrefsManager::COIN_FREE:
|
case COIN_EVENT:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ASSERT(0);
|
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") );
|
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("title menu game name") );
|
||||||
|
|
||||||
|
|
||||||
@@ -164,7 +177,7 @@ void ScreenTitleMenu::Input( const DeviceInput& DeviceI, const InputEventType ty
|
|||||||
switch( MenuI.button )
|
switch( MenuI.button )
|
||||||
{
|
{
|
||||||
case MENU_BUTTON_UP:
|
case MENU_BUTTON_UP:
|
||||||
if( PREFSMAN->m_CoinMode != PrefsManager::COIN_HOME )
|
if( PREFSMAN->m_iCoinMode != COIN_HOME )
|
||||||
break;
|
break;
|
||||||
if( m_In.IsTransitioning() || m_Out.IsTransitioning() )
|
if( m_In.IsTransitioning() || m_Out.IsTransitioning() )
|
||||||
break;
|
break;
|
||||||
@@ -177,7 +190,7 @@ void ScreenTitleMenu::Input( const DeviceInput& DeviceI, const InputEventType ty
|
|||||||
GainFocus( m_Choice );
|
GainFocus( m_Choice );
|
||||||
break;
|
break;
|
||||||
case MENU_BUTTON_DOWN:
|
case MENU_BUTTON_DOWN:
|
||||||
if( PREFSMAN->m_CoinMode != PrefsManager::COIN_HOME )
|
if( PREFSMAN->m_iCoinMode != COIN_HOME )
|
||||||
break;
|
break;
|
||||||
if( m_In.IsTransitioning() || m_Out.IsTransitioning() )
|
if( m_In.IsTransitioning() || m_Out.IsTransitioning() )
|
||||||
break;
|
break;
|
||||||
@@ -220,6 +233,21 @@ void ScreenTitleMenu::Input( const DeviceInput& DeviceI, const InputEventType ty
|
|||||||
m_Out.StartTransitioning( SM_GoToNextScreen );
|
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 );
|
// Screen::Input( DeviceI, type, GameI, MenuI, StyleI );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,8 @@
|
|||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ScreenLogo.h"
|
#include "Screen.h"
|
||||||
|
#include "Transition.h"
|
||||||
#include "Sprite.h"
|
#include "Sprite.h"
|
||||||
#include "BitmapText.h"
|
#include "BitmapText.h"
|
||||||
#include "RageSound.h"
|
#include "RageSound.h"
|
||||||
@@ -18,7 +19,7 @@
|
|||||||
#include "RandomSample.h"
|
#include "RandomSample.h"
|
||||||
|
|
||||||
|
|
||||||
class ScreenTitleMenu : public ScreenLogo
|
class ScreenTitleMenu : public Screen
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenTitleMenu();
|
ScreenTitleMenu();
|
||||||
@@ -32,8 +33,6 @@ public:
|
|||||||
{
|
{
|
||||||
CHOICE_GAME_START = 0,
|
CHOICE_GAME_START = 0,
|
||||||
CHOICE_SELECT_GAME,
|
CHOICE_SELECT_GAME,
|
||||||
/* At request, moved this into the options/operator menu -- Miryokuteki */
|
|
||||||
//CHOICE_MAP_KEY_JOY,
|
|
||||||
CHOICE_OPTIONS,
|
CHOICE_OPTIONS,
|
||||||
CHOICE_EDIT,
|
CHOICE_EDIT,
|
||||||
CHOICE_JUKEBOX,
|
CHOICE_JUKEBOX,
|
||||||
@@ -48,9 +47,7 @@ public:
|
|||||||
{
|
{
|
||||||
const CString s[NUM_CHOICES] = {
|
const CString s[NUM_CHOICES] = {
|
||||||
"GAME START",
|
"GAME START",
|
||||||
"SWITCH GAME",
|
"SELECT GAME",
|
||||||
/* At request, moved this into the options/operator menu -- Miryokuteki */
|
|
||||||
//"CONFIG KEY/JOY",
|
|
||||||
"OPTIONS",
|
"OPTIONS",
|
||||||
"EDIT/SYNC SONGS",
|
"EDIT/SYNC SONGS",
|
||||||
"JUKEBOX",
|
"JUKEBOX",
|
||||||
@@ -69,6 +66,10 @@ private:
|
|||||||
|
|
||||||
Choice m_Choice;
|
Choice m_Choice;
|
||||||
|
|
||||||
|
BGAnimation m_Background;
|
||||||
|
Sprite m_sprLogo;
|
||||||
|
BitmapText m_textVersion;
|
||||||
|
BitmapText m_textSongs;
|
||||||
BitmapText m_textHelp;
|
BitmapText m_textHelp;
|
||||||
BitmapText m_textChoice[NUM_CHOICES];
|
BitmapText m_textChoice[NUM_CHOICES];
|
||||||
|
|
||||||
@@ -81,6 +82,9 @@ private:
|
|||||||
|
|
||||||
BGAnimation m_CoinMode;
|
BGAnimation m_CoinMode;
|
||||||
BGAnimation m_JointPremium;
|
BGAnimation m_JointPremium;
|
||||||
|
|
||||||
|
Transition m_In;
|
||||||
|
Transition m_Out;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ ThemeManager::ThemeManager()
|
|||||||
m_uHashForCurThemeMetrics = m_uHashForBaseThemeMetrics = 0;
|
m_uHashForCurThemeMetrics = m_uHashForBaseThemeMetrics = 0;
|
||||||
|
|
||||||
CStringArray arrayThemeNames;
|
CStringArray arrayThemeNames;
|
||||||
GetAllThemeNames( arrayThemeNames );
|
GetThemeNames( arrayThemeNames );
|
||||||
}
|
}
|
||||||
|
|
||||||
ThemeManager::~ThemeManager()
|
ThemeManager::~ThemeManager()
|
||||||
@@ -57,7 +57,7 @@ ThemeManager::~ThemeManager()
|
|||||||
delete m_pIniMetrics;
|
delete m_pIniMetrics;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ThemeManager::GetAllThemeNames( CStringArray& AddTo )
|
void ThemeManager::GetThemeNames( CStringArray& AddTo )
|
||||||
{
|
{
|
||||||
GetDirListing( THEMES_DIR+"/*", AddTo, true );
|
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 )
|
bool ThemeManager::DoesThemeExist( CString sThemeName )
|
||||||
{
|
{
|
||||||
CStringArray asThemeNames;
|
CStringArray asThemeNames;
|
||||||
GetAllThemeNames( asThemeNames );
|
GetThemeNames( asThemeNames );
|
||||||
for( unsigned i=0; i<asThemeNames.size(); i++ )
|
for( unsigned i=0; i<asThemeNames.size(); i++ )
|
||||||
{
|
{
|
||||||
if( !sThemeName.CompareNoCase(asThemeNames[i]) )
|
if( !sThemeName.CompareNoCase(asThemeNames[i]) )
|
||||||
@@ -381,3 +363,14 @@ RageColor ThemeManager::GetMetricC( CString sClassName, CString sValueName )
|
|||||||
|
|
||||||
return RageColor(r,g,b,a);
|
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();
|
||||||
~ThemeManager();
|
~ThemeManager();
|
||||||
|
|
||||||
void GetThemeNamesForCurGame( CStringArray& AddTo );
|
void GetThemeNames( CStringArray& AddTo );
|
||||||
bool DoesThemeExist( CString sThemeName );
|
bool DoesThemeExist( CString sThemeName );
|
||||||
void SwitchTheme( CString sThemeName );
|
void SwitchTheme( CString sThemeName );
|
||||||
CString GetCurThemeName() { return m_sCurThemeName; };
|
CString GetCurThemeName() { return m_sCurThemeName; };
|
||||||
|
void NextTheme();
|
||||||
|
|
||||||
CString GetPathTo( ElementCategory category, CString sFileName, bool bOptional=false );
|
CString GetPathTo( ElementCategory category, CString sFileName, bool bOptional=false );
|
||||||
CString GetPathToB( CString sFileName ) { return GetPathTo(BGAnimations,sFileName); };
|
CString GetPathToB( CString sFileName ) { return GetPathTo(BGAnimations,sFileName); };
|
||||||
@@ -45,7 +46,6 @@ public:
|
|||||||
RageColor GetMetricC( CString sClassName, CString sValueName );
|
RageColor GetMetricC( CString sClassName, CString sValueName );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void GetAllThemeNames( CStringArray& AddTo );
|
|
||||||
CString GetPathTo( CString sThemeName, ElementCategory category, CString sFileName );
|
CString GetPathTo( CString sThemeName, ElementCategory category, CString sFileName );
|
||||||
static CString GetThemeDirFromName( const CString &sThemeName );
|
static CString GetThemeDirFromName( const CString &sThemeName );
|
||||||
CString GetElementDir( CString sThemeName );
|
CString GetElementDir( CString sThemeName );
|
||||||
|
|||||||
Reference in New Issue
Block a user