Consolidate player option and song option screens. Are people ok with this?

This commit is contained in:
Chris Danford
2003-08-23 22:04:57 +00:00
parent 4fd5ede6de
commit 45858747a5
16 changed files with 261 additions and 195 deletions
+6
View File
@@ -14,6 +14,12 @@
void ActorFrame::AddChild( Actor* pActor ) void ActorFrame::AddChild( Actor* pActor )
{ {
#if _DEBUG
// check that this Actor isn't already added.
vector<Actor*>::iterator iter = find( m_SubActors.begin(), m_SubActors.end(), pActor );
ASSERT( iter == m_SubActors.end() ); // didn't find
#endif
ASSERT( pActor ); ASSERT( pActor );
ASSERT( (void*)pActor != (void*)0xC0000005 ); ASSERT( (void*)pActor != (void*)0xC0000005 );
m_SubActors.push_back( pActor ); m_SubActors.push_back( pActor );
+20 -20
View File
@@ -47,20 +47,20 @@ enum {
OptionRow g_AppearanceOptionsLines[NUM_APPEARANCE_OPTIONS_LINES] = { OptionRow g_AppearanceOptionsLines[NUM_APPEARANCE_OPTIONS_LINES] = {
OptionRow( "Language" ), OptionRow( "Language", true ),
OptionRow( "Announcer" ), OptionRow( "Announcer", true ),
OptionRow( "Theme" ), OptionRow( "Theme", true ),
OptionRow( "Default\nNoteSkin" ), OptionRow( "Default\nNoteSkin", true ),
OptionRow( "Instructions", "SKIP","SHOW"), OptionRow( "Instructions", true, "SKIP","SHOW"),
OptionRow( "Caution", "SKIP","SHOW"), OptionRow( "Caution", true, "SKIP","SHOW"),
OptionRow( "Oni Score\nDisplay","PERCENT","DANCE POINTS"), OptionRow( "Oni Score\nDisplay",true, "PERCENT","DANCE POINTS"),
OptionRow( "Song\nGroup", "ALL MUSIC","CHOOSE"), OptionRow( "Song\nGroup", true, "ALL MUSIC","CHOOSE"),
OptionRow( "Wheel\nSections", "NEVER","ALWAYS", "ABC ONLY"), OptionRow( "Wheel\nSections", true, "NEVER","ALWAYS", "ABC ONLY"),
OptionRow( "10+ foot\nIn Red", "NO", "YES"), OptionRow( "10+ foot\nIn Red", true, "NO", "YES"),
OptionRow( "Course\nSort", "# SONGS", "AVG FEET", "TOTAL FEET", "RANKING"), OptionRow( "Course\nSort", true, "# SONGS", "AVG FEET", "TOTAL FEET", "RANKING"),
OptionRow( "Random\nAt End", "NO","YES"), OptionRow( "Random\nAt End", true, "NO","YES"),
OptionRow( "Translations", "NATIVE","TRANSLITERATE"), OptionRow( "Translations", true, "NATIVE","TRANSLITERATE"),
OptionRow( "Lyrics", "HIDE","SHOW"), OptionRow( "Lyrics", true, "HIDE","SHOW"),
}; };
ScreenAppearanceOptions::ScreenAppearanceOptions() : ScreenAppearanceOptions::ScreenAppearanceOptions() :
@@ -69,10 +69,10 @@ ScreenAppearanceOptions::ScreenAppearanceOptions() :
LOG->Trace( "ScreenAppearanceOptions::ScreenAppearanceOptions()" ); LOG->Trace( "ScreenAppearanceOptions::ScreenAppearanceOptions()" );
Init( Init(
INPUTMODE_BOTH, INPUTMODE_TOGETHER,
g_AppearanceOptionsLines, g_AppearanceOptionsLines,
NUM_APPEARANCE_OPTIONS_LINES, NUM_APPEARANCE_OPTIONS_LINES,
false, true ); true );
m_Menu.m_MenuTimer.Disable(); m_Menu.m_MenuTimer.Disable();
SOUND->PlayMusic( THEME->GetPathToS("ScreenAppearanceOptions music") ); SOUND->PlayMusic( THEME->GetPathToS("ScreenAppearanceOptions music") );
@@ -89,7 +89,7 @@ void ScreenAppearanceOptions::ImportOptions()
THEME->GetLanguages( arrayLanguages ); THEME->GetLanguages( arrayLanguages );
m_OptionRow[AO_LANGUAGE].choices.clear(); m_OptionRow[AO_LANGUAGE].choices.clear();
for( i=0; i<arrayLanguages.size() && i<MAX_OPTIONS_PER_LINE; i++ ) for( i=0; i<arrayLanguages.size(); i++ )
{ {
m_OptionRow[AO_LANGUAGE].choices.push_back( arrayLanguages[i] ); m_OptionRow[AO_LANGUAGE].choices.push_back( arrayLanguages[i] );
} }
@@ -109,7 +109,7 @@ void ScreenAppearanceOptions::ImportOptions()
m_OptionRow[AO_ANNOUNCER].choices.clear(); m_OptionRow[AO_ANNOUNCER].choices.clear();
m_OptionRow[AO_ANNOUNCER].choices.push_back( "OFF" ); m_OptionRow[AO_ANNOUNCER].choices.push_back( "OFF" );
for( i=0; i<arrayAnnouncerNames.size() && i<MAX_OPTIONS_PER_LINE; i++ ) for( i=0; i<arrayAnnouncerNames.size(); i++ )
{ {
m_OptionRow[AO_ANNOUNCER].choices.push_back( arrayAnnouncerNames[i] ); m_OptionRow[AO_ANNOUNCER].choices.push_back( arrayAnnouncerNames[i] );
} }
@@ -129,7 +129,7 @@ void ScreenAppearanceOptions::ImportOptions()
m_OptionRow[AO_THEME].choices.clear(); m_OptionRow[AO_THEME].choices.clear();
for( i=0; i<arrayThemeNames.size() && i<MAX_OPTIONS_PER_LINE; i++ ) for( i=0; i<arrayThemeNames.size(); i++ )
{ {
m_OptionRow[AO_THEME].choices.push_back( arrayThemeNames[i] ); m_OptionRow[AO_THEME].choices.push_back( arrayThemeNames[i] );
} }
@@ -149,7 +149,7 @@ void ScreenAppearanceOptions::ImportOptions()
m_OptionRow[AO_SKIN].choices.clear(); m_OptionRow[AO_SKIN].choices.clear();
for( i=0; i<arraySkinNames.size() && i<MAX_OPTIONS_PER_LINE; i++ ) for( i=0; i<arraySkinNames.size(); i++ )
{ {
arraySkinNames[i].MakeUpper(); arraySkinNames[i].MakeUpper();
m_OptionRow[AO_SKIN].choices.push_back( arraySkinNames[i] ); m_OptionRow[AO_SKIN].choices.push_back( arraySkinNames[i] );
+4 -4
View File
@@ -29,8 +29,8 @@ enum {
}; };
OptionRow g_AutogenOptionsLines[NUM_AUTOGEN_OPTIONS_LINES] = { OptionRow g_AutogenOptionsLines[NUM_AUTOGEN_OPTIONS_LINES] = {
OptionRow( "Autogen\nMissing Types", "OFF","ON" ), OptionRow( "Autogen\nMissing Types", true, "OFF","ON" ),
OptionRow( "Autogen\nGroup Courses", "OFF","ON" ), OptionRow( "Autogen\nGroup Courses", true, "OFF","ON" ),
}; };
ScreenAutogenOptions::ScreenAutogenOptions() : ScreenAutogenOptions::ScreenAutogenOptions() :
@@ -39,10 +39,10 @@ ScreenAutogenOptions::ScreenAutogenOptions() :
LOG->Trace( "ScreenAutogenOptions::ScreenAutogenOptions()" ); LOG->Trace( "ScreenAutogenOptions::ScreenAutogenOptions()" );
Init( Init(
INPUTMODE_BOTH, INPUTMODE_TOGETHER,
g_AutogenOptionsLines, g_AutogenOptionsLines,
NUM_AUTOGEN_OPTIONS_LINES, NUM_AUTOGEN_OPTIONS_LINES,
false, true ); true );
m_Menu.m_MenuTimer.Disable(); m_Menu.m_MenuTimer.Disable();
SOUND->PlayMusic( THEME->GetPathToS("ScreenAutogenOptions music") ); SOUND->PlayMusic( THEME->GetPathToS("ScreenAutogenOptions music") );
+8 -8
View File
@@ -34,12 +34,12 @@ enum {
}; };
OptionRow g_BackgroundOptionsLines[NUM_BACKGROUND_OPTIONS_LINES] = { OptionRow g_BackgroundOptionsLines[NUM_BACKGROUND_OPTIONS_LINES] = {
OptionRow( "Mode", "OFF","ANIMATIONS","VISUALIZATIONS","RANDOM MOVIES" ), OptionRow( "Mode", true, "OFF","ANIMATIONS","VISUALIZATIONS","RANDOM MOVIES" ),
OptionRow( "Brightness", "0%","10%","20%","30%","40%","50%","60%","70%","80%","90%","100%" ), OptionRow( "Brightness", true, "0%","10%","20%","30%","40%","50%","60%","70%","80%","90%","100%" ),
OptionRow( "Danger", "HIDE","SHOW" ), OptionRow( "Danger", true, "HIDE","SHOW" ),
OptionRow( "Dancing\nCharacters", "DEFAULT TO OFF","DEFAULT TO RANDOM" ), OptionRow( "Dancing\nCharacters", true, "DEFAULT TO OFF","DEFAULT TO RANDOM" ),
OptionRow( "Show Beginner\nHelper", "OFF","ON" ), OptionRow( "Show Beginner\nHelper", true, "OFF","ON" ),
OptionRow( "Random\nBackgrounds", "5","10","15","20" ), OptionRow( "Random\nBackgrounds", true, "5","10","15","20" ),
}; };
ScreenBackgroundOptions::ScreenBackgroundOptions() : ScreenBackgroundOptions::ScreenBackgroundOptions() :
@@ -48,10 +48,10 @@ ScreenBackgroundOptions::ScreenBackgroundOptions() :
LOG->Trace( "ScreenBackgroundOptions::ScreenBackgroundOptions()" ); LOG->Trace( "ScreenBackgroundOptions::ScreenBackgroundOptions()" );
Init( Init(
INPUTMODE_BOTH, INPUTMODE_TOGETHER,
g_BackgroundOptionsLines, g_BackgroundOptionsLines,
NUM_BACKGROUND_OPTIONS_LINES, NUM_BACKGROUND_OPTIONS_LINES,
false, true ); true );
m_Menu.m_MenuTimer.Disable(); m_Menu.m_MenuTimer.Disable();
SOUND->PlayMusic( THEME->GetPathToS("ScreenMachineOptions music") ); SOUND->PlayMusic( THEME->GetPathToS("ScreenMachineOptions music") );
+8 -8
View File
@@ -34,12 +34,12 @@ enum {
}; };
OptionRow g_GameplayOptionsLines[NUM_GAMEPLAY_OPTIONS_LINES] = { OptionRow g_GameplayOptionsLines[NUM_GAMEPLAY_OPTIONS_LINES] = {
OptionRow( "Solo\nSingles", "OFF","ON" ), OptionRow( "Solo\nSingles", true, "OFF","ON" ),
OptionRow( "Hidden\nSongs", "OFF","ON" ), OptionRow( "Hidden\nSongs", true, "OFF","ON" ),
OptionRow( "Easter\nEggs", "OFF","ON" ), OptionRow( "Easter\nEggs", true, "OFF","ON" ),
OptionRow( "Marvelous\nTiming", "NEVER","COURSES ONLY","ALWAYS" ), OptionRow( "Marvelous\nTiming", true, "NEVER","COURSES ONLY","ALWAYS" ),
OptionRow( "Pick Extra\nStage", "OFF","ON" ), OptionRow( "Pick Extra\nStage", true, "OFF","ON" ),
OptionRow( "Unlock\nSystem", "OFF","ON" ) OptionRow( "Unlock\nSystem", true, "OFF","ON" )
}; };
ScreenGameplayOptions::ScreenGameplayOptions() : ScreenGameplayOptions::ScreenGameplayOptions() :
@@ -48,10 +48,10 @@ ScreenGameplayOptions::ScreenGameplayOptions() :
LOG->Trace( "ScreenGameplayOptions::ScreenGameplayOptions()" ); LOG->Trace( "ScreenGameplayOptions::ScreenGameplayOptions()" );
Init( Init(
INPUTMODE_BOTH, INPUTMODE_TOGETHER,
g_GameplayOptionsLines, g_GameplayOptionsLines,
NUM_GAMEPLAY_OPTIONS_LINES, NUM_GAMEPLAY_OPTIONS_LINES,
false, true ); true );
m_Menu.m_MenuTimer.Disable(); m_Menu.m_MenuTimer.Disable();
SOUND->PlayMusic( THEME->GetPathToS("ScreenMachineOptions music") ); SOUND->PlayMusic( THEME->GetPathToS("ScreenMachineOptions music") );
+11 -11
View File
@@ -35,15 +35,15 @@ enum {
NUM_GRAPHIC_OPTIONS_LINES NUM_GRAPHIC_OPTIONS_LINES
}; };
OptionRow g_GraphicOptionsLines[NUM_GRAPHIC_OPTIONS_LINES] = { OptionRow g_GraphicOptionsLines[NUM_GRAPHIC_OPTIONS_LINES] = {
OptionRow( "Display\nMode", "FULLSCREEN", "WINDOWED" ), OptionRow( "Display\nMode", true, "FULLSCREEN", "WINDOWED" ),
OptionRow( "Display\nResolution", "320","400","512","640","800","1024","1280" ), OptionRow( "Display\nResolution", true, "320","400","512","640","800","1024","1280" ),
OptionRow( "Display\nColor", "16BIT","32BIT" ), OptionRow( "Display\nColor", true, "16BIT","32BIT" ),
OptionRow( "Max Texture\nResolution", "256","512","1024","2048" ), OptionRow( "Max Texture\nResolution", true, "256","512","1024","2048" ),
OptionRow( "Texture\nColor", "16BIT","32BIT" ), OptionRow( "Texture\nColor", true, "16BIT","32BIT" ),
OptionRow( "Keep Textures\nIn Memory", "NO","YES" ), OptionRow( "Keep Textures\nIn Memory", true, "NO","YES" ),
OptionRow( "Refresh\nRate", "DEFAULT","60","70","72","75","80","85","90","100","120","150" ), OptionRow( "Refresh\nRate", true, "DEFAULT","60","70","72","75","80","85","90","100","120","150" ),
OptionRow( "Movie\nDecode", "1ms","2ms","3ms","4ms" ), OptionRow( "Movie\nDecode", true, "1ms","2ms","3ms","4ms" ),
OptionRow( "Wait For\nVsync", "NO", "YES" ), OptionRow( "Wait For\nVsync", true, "NO", "YES" ),
}; };
static const int HorizRes[] = { static const int HorizRes[] = {
@@ -62,10 +62,10 @@ ScreenGraphicOptions::ScreenGraphicOptions() :
LOG->Trace( "ScreenGraphicOptions::ScreenGraphicOptions()" ); LOG->Trace( "ScreenGraphicOptions::ScreenGraphicOptions()" );
Init( Init(
INPUTMODE_BOTH, INPUTMODE_TOGETHER,
g_GraphicOptionsLines, g_GraphicOptionsLines,
NUM_GRAPHIC_OPTIONS_LINES, NUM_GRAPHIC_OPTIONS_LINES,
false, true ); true );
m_Menu.m_MenuTimer.Disable(); m_Menu.m_MenuTimer.Disable();
SOUND->PlayMusic( THEME->GetPathToS("ScreenGraphicOptions music") ); SOUND->PlayMusic( THEME->GetPathToS("ScreenGraphicOptions music") );
+9 -9
View File
@@ -36,13 +36,13 @@ enum {
/* Hmm. Ignore JoyAxes and Back Delayed probably belong in "key/joy config", /* Hmm. Ignore JoyAxes and Back Delayed probably belong in "key/joy config",
* preferably alongside button configuration. */ * preferably alongside button configuration. */
OptionRow g_InputOptionsLines[NUM_INPUT_OPTIONS_LINES] = { OptionRow g_InputOptionsLines[NUM_INPUT_OPTIONS_LINES] = {
OptionRow( "Auto Map\nJoysticks", "OFF","ON (recommended)" ), OptionRow( "Auto Map\nJoysticks", true, "OFF","ON (recommended)" ),
OptionRow( "Ignore\nJoy Axes", "OFF","ON (for NTPad or DirectPad)" ), OptionRow( "Ignore\nJoy Axes", true, "OFF","ON (for NTPad or DirectPad)" ),
OptionRow( "Menu\nButtons", "USE GAMEPLAY BUTTONS","ONLY DEDICATED BUTTONS" ), OptionRow( "Menu\nButtons", true, "USE GAMEPLAY BUTTONS","ONLY DEDICATED BUTTONS" ),
OptionRow( "AutoPlay", "OFF","ON" ), OptionRow( "AutoPlay", true, "OFF","ON" ),
OptionRow( "Back\nDelayed", "INSTANT","HOLD" ), OptionRow( "Back\nDelayed", true, "INSTANT","HOLD" ),
OptionRow( "Options\nNavigation", "SM STYLE","ARCADE STYLE" ), OptionRow( "Options\nNavigation", true, "SM STYLE","ARCADE STYLE" ),
OptionRow( "Wheel\nSpeed", "SLOW","NORMAL","FAST","REALLY FAST" ), OptionRow( "Wheel\nSpeed", true, "SLOW","NORMAL","FAST","REALLY FAST" ),
}; };
ScreenInputOptions::ScreenInputOptions() : ScreenInputOptions::ScreenInputOptions() :
@@ -51,10 +51,10 @@ ScreenInputOptions::ScreenInputOptions() :
LOG->Trace( "ScreenInputOptions::ScreenInputOptions()" ); LOG->Trace( "ScreenInputOptions::ScreenInputOptions()" );
Init( Init(
INPUTMODE_BOTH, INPUTMODE_TOGETHER,
g_InputOptionsLines, g_InputOptionsLines,
NUM_INPUT_OPTIONS_LINES, NUM_INPUT_OPTIONS_LINES,
false, true ); true );
m_Menu.m_MenuTimer.Disable(); m_Menu.m_MenuTimer.Disable();
SOUND->PlayMusic( THEME->GetPathToS("ScreenInputOptions music") ); SOUND->PlayMusic( THEME->GetPathToS("ScreenInputOptions music") );
+16 -16
View File
@@ -43,20 +43,20 @@ enum {
}; };
OptionRow g_MachineOptionsLines[NUM_MACHINE_OPTIONS_LINES] = { OptionRow g_MachineOptionsLines[NUM_MACHINE_OPTIONS_LINES] = {
OptionRow( "Menu\nTimer", "OFF","ON" ), OptionRow( "Menu\nTimer", true, "OFF","ON" ),
OptionRow( "Coin\nMode", "HOME","PAY","FREE PLAY" ), OptionRow( "Coin\nMode", true, "HOME","PAY","FREE PLAY" ),
OptionRow( "Songs Per\nPlay", "1","2","3","4","5","6","7","EVENT MODE" ), OptionRow( "Songs Per\nPlay", true, "1","2","3","4","5","6","7","EVENT MODE" ),
OptionRow( "Scoring\nType", "MAX2","5TH" ), OptionRow( "Scoring\nType", true, "MAX2","5TH" ),
OptionRow( "Judge\nDifficulty", "1","2","3","4","5","6","7","8","JUSTICE" ), OptionRow( "Judge\nDifficulty", true, "1","2","3","4","5","6","7","8","JUSTICE" ),
OptionRow( "Life\nDifficulty", "1","2","3","4","5","6","7" ), OptionRow( "Life\nDifficulty", true, "1","2","3","4","5","6","7" ),
OptionRow( "Progressive\nLifebar", "OFF","1","2","3","4","5","6","7","8"), OptionRow( "Progressive\nLifebar", true, "OFF","1","2","3","4","5","6","7","8"),
OptionRow( "Progressive\nStage Lifebar", "OFF","1","2","3","4","5","6","7","8","INSANITY"), OptionRow( "Progressive\nStage Lifebar", true, "OFF","1","2","3","4","5","6","7","8","INSANITY"),
OptionRow( "Progressive\nNonstop Lifebar", "OFF","1","2","3","4","5","6","7","8","INSANITY"), OptionRow( "Progressive\nNonstop Lifebar", true, "OFF","1","2","3","4","5","6","7","8","INSANITY"),
OptionRow( "Default\nFail Type", "ARCADE","END OF SONG","OFF" ), OptionRow( "Default\nFail Type", true, "ARCADE","END OF SONG","OFF" ),
OptionRow( "Show\nStats", "OFF","ON" ), OptionRow( "Show\nStats", true, "OFF","ON" ),
OptionRow( "Coins Per\nCredit", "1","2","3","4","5","6","7","8" ), OptionRow( "Coins Per\nCredit", true, "1","2","3","4","5","6","7","8" ),
OptionRow( "Joint\nPremium", "OFF","ON" ), OptionRow( "Joint\nPremium", true, "OFF","ON" ),
OptionRow( "Song\nOptions", "HIDE","SHOW","ASK" ), OptionRow( "Song\nOptions", true, "HIDE","SHOW","ASK" ),
}; };
ScreenMachineOptions::ScreenMachineOptions() : ScreenMachineOptions::ScreenMachineOptions() :
@@ -65,10 +65,10 @@ ScreenMachineOptions::ScreenMachineOptions() :
LOG->Trace( "ScreenMachineOptions::ScreenMachineOptions()" ); LOG->Trace( "ScreenMachineOptions::ScreenMachineOptions()" );
Init( Init(
INPUTMODE_BOTH, INPUTMODE_TOGETHER,
g_MachineOptionsLines, g_MachineOptionsLines,
NUM_MACHINE_OPTIONS_LINES, NUM_MACHINE_OPTIONS_LINES,
false, true ); true );
m_Menu.m_MenuTimer.Disable(); m_Menu.m_MenuTimer.Disable();
SOUND->PlayMusic( THEME->GetPathToS("ScreenMachineOptions music") ); SOUND->PlayMusic( THEME->GetPathToS("ScreenMachineOptions music") );
+68 -63
View File
@@ -74,7 +74,7 @@ ScreenOptions::ScreenOptions( CString sClassName, bool bEnableTimer ) : Screen("
memset(&m_bRowIsLong, 0, sizeof(m_bRowIsLong)); memset(&m_bRowIsLong, 0, sizeof(m_bRowIsLong));
} }
void ScreenOptions::Init( InputMode im, OptionRow OptionRow[], int iNumOptionLines, bool bUseIcons, bool bLoadExplanations ) void ScreenOptions::Init( InputMode im, OptionRow OptionRow[], int iNumOptionLines, bool bLoadExplanations )
{ {
LOG->Trace( "ScreenOptions::Set()" ); LOG->Trace( "ScreenOptions::Set()" );
@@ -82,51 +82,61 @@ void ScreenOptions::Init( InputMode im, OptionRow OptionRow[], int iNumOptionLin
m_InputMode = im; m_InputMode = im;
m_OptionRow = OptionRow; m_OptionRow = OptionRow;
m_iNumOptionRows = iNumOptionLines; m_iNumOptionRows = iNumOptionLines;
m_bUseIcons = bUseIcons;
m_bLoadExplanations = bLoadExplanations; m_bLoadExplanations = bLoadExplanations;
this->ImportOptions(); this->ImportOptions();
if( m_InputMode == INPUTMODE_BOTH ) for( unsigned l=0; l<MAX_OPTION_LINES; l++ )
{ if( m_OptionRow[l].bOneChoiceForAllPlayers )
for( unsigned l=0; l<MAX_OPTION_LINES; l++ )
m_iSelectedOption[PLAYER_2][l] = m_iSelectedOption[PLAYER_1][l]; m_iSelectedOption[PLAYER_2][l] = m_iSelectedOption[PLAYER_1][l];
int p;
// init highlights
for( p=0; p<NUM_PLAYERS; p++ )
{
if( !GAMESTATE->IsHumanPlayer(p) )
continue; // skip
m_Highlight[p].Load( (PlayerNumber)p, false );
m_framePage.AddChild( &m_Highlight[p] );
} }
// init highlights and underlines // init underlines
for( int p=0; p<NUM_PLAYERS; p++ ) for( p=0; p<NUM_PLAYERS; p++ )
{ {
if( !GAMESTATE->IsHumanPlayer(p) ) if( !GAMESTATE->IsHumanPlayer(p) )
continue; // skip continue; // skip
for( int l=0; l<m_iNumOptionRows; l++ ) for( int l=0; l<m_iNumOptionRows; l++ )
{ {
m_Underline[p][l].Load( (PlayerNumber)p, true );
m_framePage.AddChild( &m_Underline[p][l] );
m_OptionIcons[p][l].Load( (PlayerNumber)p, "", false ); m_OptionIcons[p][l].Load( (PlayerNumber)p, "", false );
m_framePage.AddChild( &m_OptionIcons[p][l] ); m_framePage.AddChild( &m_OptionIcons[p][l] );
m_Underline[p][l].Load( (PlayerNumber)p, true );
m_framePage.AddChild( &m_Underline[p][l] );
} }
m_Highlight[p].Load( (PlayerNumber)p, false );
m_framePage.AddChild( &m_Highlight[p] );
} }
// init text // init text
int i; int r;
for( i=0; i<m_iNumOptionRows; i++ ) // foreach line for( r=0; r<m_iNumOptionRows; r++ ) // foreach line
{ {
m_framePage.AddChild( &m_sprBullets[i] ); m_framePage.AddChild( &m_sprBullets[r] );
m_framePage.AddChild( &m_textTitles[i] ); m_framePage.AddChild( &m_textTitles[r] );
for( unsigned j=0; j<m_OptionRow[i].choices.size(); j++ ) int iNumChoices = min( m_OptionRow[r].choices.size(), MAX_VISIBLE_VALUES_PER_LINE );
m_framePage.AddChild( &m_textItems[i][j] ); for( unsigned c=0; c<iNumChoices; c++ )
{
m_framePage.AddChild( &m_textItems[r][c] );
}
} }
// TRICKY: Add one more item. This will be "EXIT" // TRICKY: Add one more item. This will be "EXIT"
m_framePage.AddChild( &m_textItems[i][0] ); m_framePage.AddChild( &m_textItems[r][0] );
// add explanation here so it appears on top // add explanation here so it appears on top
m_textExplanation.LoadFromFont( THEME->GetPathToF("ScreenOptions explanation") ); m_textExplanation.LoadFromFont( THEME->GetPathToF("ScreenOptions explanation") );
@@ -148,17 +158,17 @@ void ScreenOptions::Init( InputMode im, OptionRow OptionRow[], int iNumOptionLin
/* It's tweening into position, but on the initial tween-in we only want to /* It's tweening into position, but on the initial tween-in we only want to
* tween in the whole page at once. Since the tweens are nontrivial, it's * tween in the whole page at once. Since the tweens are nontrivial, it's
* easiest to queue the tweens and then force them to finish. */ * easiest to queue the tweens and then force them to finish. */
for( i=0; i<m_iNumOptionRows; i++ ) // foreach options line for( r=0; r<m_iNumOptionRows; r++ ) // foreach options row
{ {
m_textTitles[i].FinishTweening(); m_textTitles[r].FinishTweening();
m_sprBullets[i].FinishTweening(); m_sprBullets[r].FinishTweening();
for( unsigned j=0; j<m_OptionRow[i].choices.size(); j++ ) for( unsigned c=0; c<m_OptionRow[r].choices.size(); c++ )
m_textItems[i][j].FinishTweening(); m_textItems[r][c].FinishTweening();
for( int p=0; p<NUM_PLAYERS; p++ ) // foreach player for( int p=0; p<NUM_PLAYERS; p++ ) // foreach player
{ {
m_Underline[p][i].FinishTweening(); m_Underline[p][r].FinishTweening();
m_OptionIcons[p][i].FinishTweening(); m_OptionIcons[p][r].FinishTweening();
} }
} }
} }
@@ -255,8 +265,9 @@ void ScreenOptions::InitOptionsText()
option.EnableShadow( false ); option.EnableShadow( false );
option.SetY( fY ); option.SetY( fY );
/* If we're in INPUTMODE_BOTH, center the items. */
if( m_InputMode == INPUTMODE_BOTH ) /* if choices are locked together, center the item. */
if( optline.bOneChoiceForAllPlayers )
option.SetX( (ITEM_X[0]+ITEM_X[1])/2 ); option.SetX( (ITEM_X[0]+ITEM_X[1])/2 );
else else
option.SetX( ITEM_X[p] ); option.SetX( ITEM_X[p] );
@@ -343,6 +354,7 @@ void ScreenOptions::RefreshIcons()
for( int i=0; i<m_iNumOptionRows; i++ ) // foreach options line for( int i=0; i<m_iNumOptionRows; i++ ) // foreach options line
{ {
OptionRow &row = m_OptionRow[i];
OptionIcon &icon = m_OptionIcons[p][i]; OptionIcon &icon = m_OptionIcons[p][i];
int iSelection = m_iSelectedOption[p][i]; int iSelection = m_iSelectedOption[p][i];
@@ -359,10 +371,13 @@ void ScreenOptions::RefreshIcons()
RageException::Throw( "%s", error.c_str() ); RageException::Throw( "%s", error.c_str() );
} }
CString sSelection = m_OptionRow[i].choices[iSelection]; CString sSelection = row.choices[iSelection];
if( sSelection == "ON" ) if( sSelection == "ON" )
sSelection = m_OptionRow[i].name; sSelection = m_OptionRow[i].name;
icon.Load( (PlayerNumber)p, m_bUseIcons ? sSelection : "", false ); if( row.bOneChoiceForAllPlayers )
icon.Load( (PlayerNumber)p, "", false );
else
icon.Load( (PlayerNumber)p, sSelection, false );
} }
} }
} }
@@ -469,7 +484,7 @@ void ScreenOptions::UpdateEnabledDisabled()
} }
/* Hide the text of all but the first active player, so we don't overdraw. */ /* Hide the text of all but the first active player, so we don't overdraw. */
if( m_InputMode == INPUTMODE_BOTH && m_bRowIsLong[i] ) if( m_InputMode == INPUTMODE_TOGETHER && m_bRowIsLong[i] )
{ {
bool one = false; bool one = false;
for( unsigned j=0; j<NUM_PLAYERS; j++ ) for( unsigned j=0; j<NUM_PLAYERS; j++ )
@@ -579,7 +594,7 @@ void ScreenOptions::PositionItems()
const int P2Choice = GAMESTATE->IsHumanPlayer(PLAYER_2)? m_iCurrentRow[PLAYER_2]: m_iCurrentRow[PLAYER_1]; const int P2Choice = GAMESTATE->IsHumanPlayer(PLAYER_2)? m_iCurrentRow[PLAYER_2]: m_iCurrentRow[PLAYER_1];
const bool BothPlayersActivated = GAMESTATE->IsHumanPlayer(PLAYER_1) && GAMESTATE->IsHumanPlayer(PLAYER_2); const bool BothPlayersActivated = GAMESTATE->IsHumanPlayer(PLAYER_1) && GAMESTATE->IsHumanPlayer(PLAYER_2);
if( m_InputMode == INPUTMODE_BOTH || !BothPlayersActivated ) if( m_InputMode == INPUTMODE_TOGETHER || !BothPlayersActivated )
{ {
/* Simply center the cursor. */ /* Simply center the cursor. */
first_start = max( P1Choice - halfsize, 0 ); first_start = max( P1Choice - halfsize, 0 );
@@ -717,11 +732,12 @@ void ScreenOptions::MenuStart( PlayerNumber pn )
} }
} }
void ScreenOptions::MenuLeft( PlayerNumber pn )
void ScreenOptions::ChangeValue( PlayerNumber pn, int iDelta )
{ {
for( int p=0; p<NUM_PLAYERS; p++ ) for( int p=0; p<NUM_PLAYERS; p++ )
{ {
if( m_InputMode == INPUTMODE_PLAYERS && p != pn ) if( m_InputMode == INPUTMODE_INDIVIDUAL && p != pn )
continue; // skip continue; // skip
int iCurRow = m_iCurrentRow[p]; int iCurRow = m_iCurrentRow[p];
@@ -729,11 +745,23 @@ void ScreenOptions::MenuLeft( PlayerNumber pn )
if( iCurRow == m_iNumOptionRows ) // EXIT is selected if( iCurRow == m_iNumOptionRows ) // EXIT is selected
return; // don't allow a move return; // don't allow a move
const int iNumOptions = m_OptionRow[iCurRow].choices.size(); OptionRow &row = m_OptionRow[iCurRow];
const int iNumOptions = row.choices.size();
if( iNumOptions == 1 ) if( iNumOptions == 1 )
continue; continue;
m_iSelectedOption[p][iCurRow] = (m_iSelectedOption[p][iCurRow]-1+iNumOptions) % iNumOptions; int iNewSel = (m_iSelectedOption[p][iCurRow]+iDelta+iNumOptions) % iNumOptions;
if( row.bOneChoiceForAllPlayers )
{
for( int p2=0; p2<NUM_PLAYERS; p2++ )
m_iSelectedOption[p2][iCurRow] = iNewSel;
}
else
{
m_iSelectedOption[p][iCurRow] = iNewSel;
}
UpdateText( (PlayerNumber)p ); UpdateText( (PlayerNumber)p );
} }
@@ -741,35 +769,12 @@ void ScreenOptions::MenuLeft( PlayerNumber pn )
OnChange(); OnChange();
} }
void ScreenOptions::MenuRight( PlayerNumber pn )
{
for( int p=0; p<NUM_PLAYERS; p++ )
{
if( m_InputMode == INPUTMODE_PLAYERS && p != pn )
continue; // skip
int iCurRow = m_iCurrentRow[p];
if( iCurRow == m_iNumOptionRows ) // EXIT is selected
return; // don't allow a move
const int iNumOptions = m_OptionRow[iCurRow].choices.size();
if( iNumOptions == 1 )
continue;
m_iSelectedOption[p][iCurRow] = (m_iSelectedOption[p][iCurRow]+1) % iNumOptions;
UpdateText( (PlayerNumber)p );
}
m_SoundChangeCol.Play();
OnChange();
}
void ScreenOptions::MenuUp( PlayerNumber pn ) void ScreenOptions::MenuUp( PlayerNumber pn )
{ {
for( int p=0; p<NUM_PLAYERS; p++ ) for( int p=0; p<NUM_PLAYERS; p++ )
{ {
if( m_InputMode == INPUTMODE_PLAYERS && p != pn ) if( m_InputMode == INPUTMODE_INDIVIDUAL && p != pn )
continue; // skip continue; // skip
if( m_iCurrentRow[p] == 0 ) // on first row if( m_iCurrentRow[p] == 0 ) // on first row
@@ -786,7 +791,7 @@ void ScreenOptions::MenuDown( PlayerNumber pn )
{ {
for( int p=0; p<NUM_PLAYERS; p++ ) for( int p=0; p<NUM_PLAYERS; p++ )
{ {
if( m_InputMode == INPUTMODE_PLAYERS && p != pn ) if( m_InputMode == INPUTMODE_INDIVIDUAL && p != pn )
continue; // skip continue; // skip
if( m_iCurrentRow[p] == m_iNumOptionRows ) // on exit if( m_iCurrentRow[p] == m_iNumOptionRows ) // on exit
+12 -10
View File
@@ -22,17 +22,19 @@
#include "OptionIcon.h" #include "OptionIcon.h"
const unsigned MAX_OPTION_LINES = 20; const unsigned MAX_OPTION_LINES = 40;
const unsigned MAX_OPTIONS_PER_LINE = 20; const unsigned MAX_VISIBLE_VALUES_PER_LINE = 20;
struct OptionRow struct OptionRow
{ {
CString name; CString name;
bool bOneChoiceForAllPlayers;
vector<CString> choices; vector<CString> choices;
OptionRow( CString n, CString c0="", CString c1="", CString c2="", CString c3="", CString c4="", CString c5="", CString c6="", CString c7="", CString c8="", CString c9="", CString c10="", CString c11="", CString c12="", CString c13="", CString c14="", CString c15="", CString c16="", CString c17="", CString c18="", CString c19="" ) OptionRow( CString n, int b, CString c0="", CString c1="", CString c2="", CString c3="", CString c4="", CString c5="", CString c6="", CString c7="", CString c8="", CString c9="", CString c10="", CString c11="", CString c12="", CString c13="", CString c14="", CString c15="", CString c16="", CString c17="", CString c18="", CString c19="" )
{ {
name = n; name = n;
bOneChoiceForAllPlayers = !!b;
#define PUSH( c ) if(c!="") choices.push_back(c); #define PUSH( c ) if(c!="") choices.push_back(c);
PUSH(c0);PUSH(c1);PUSH(c2);PUSH(c3);PUSH(c4);PUSH(c5);PUSH(c6);PUSH(c7);PUSH(c8);PUSH(c9);PUSH(c10);PUSH(c11);PUSH(c12);PUSH(c13);PUSH(c14);PUSH(c15);PUSH(c16);PUSH(c17);PUSH(c18);PUSH(c19); PUSH(c0);PUSH(c1);PUSH(c2);PUSH(c3);PUSH(c4);PUSH(c5);PUSH(c6);PUSH(c7);PUSH(c8);PUSH(c9);PUSH(c10);PUSH(c11);PUSH(c12);PUSH(c13);PUSH(c14);PUSH(c15);PUSH(c16);PUSH(c17);PUSH(c18);PUSH(c19);
#undef PUSH #undef PUSH
@@ -41,8 +43,8 @@ struct OptionRow
enum InputMode enum InputMode
{ {
INPUTMODE_PLAYERS, // each player controls their own cursor INPUTMODE_INDIVIDUAL, // each player controls their own cursor
INPUTMODE_BOTH // both players control the same cursor INPUTMODE_TOGETHER // both players control the same cursor
}; };
@@ -50,7 +52,7 @@ class ScreenOptions : public Screen
{ {
public: public:
ScreenOptions( CString sClassName, bool bEnableTimer ); ScreenOptions( CString sClassName, bool bEnableTimer );
void Init( InputMode im, OptionRow OptionRow[], int iNumOptionLines, bool bUseIcons, bool bLoadExplanations ); void Init( InputMode im, OptionRow OptionRow[], int iNumOptionLines, bool bLoadExplanations );
virtual ~ScreenOptions(); virtual ~ScreenOptions();
virtual void Update( float fDeltaTime ); virtual void Update( float fDeltaTime );
virtual void DrawPrimitives(); virtual void DrawPrimitives();
@@ -80,8 +82,9 @@ protected:
virtual void GoToNextState() = 0; virtual void GoToNextState() = 0;
virtual void GoToPrevState() = 0; virtual void GoToPrevState() = 0;
void MenuLeft( PlayerNumber pn ); void MenuLeft( PlayerNumber pn ) { ChangeValue(pn,-1); }
void MenuRight( PlayerNumber pn ); void MenuRight( PlayerNumber pn ) { ChangeValue(pn,+1); }
void ChangeValue( PlayerNumber pn, int iDelta );
void MenuUp( PlayerNumber pn ); void MenuUp( PlayerNumber pn );
void MenuDown( PlayerNumber pn ); void MenuDown( PlayerNumber pn );
@@ -95,7 +98,6 @@ protected:
private: private:
CString m_sName; CString m_sName;
InputMode m_InputMode; InputMode m_InputMode;
bool m_bUseIcons;
bool m_bLoadExplanations; bool m_bLoadExplanations;
int m_iNumOptionRows; int m_iNumOptionRows;
@@ -104,7 +106,7 @@ private:
Sprite m_sprPage; Sprite m_sprPage;
Sprite m_sprBullets[MAX_OPTION_LINES]; Sprite m_sprBullets[MAX_OPTION_LINES];
BitmapText m_textTitles[MAX_OPTION_LINES]; BitmapText m_textTitles[MAX_OPTION_LINES];
BitmapText m_textItems[MAX_OPTION_LINES][MAX_OPTIONS_PER_LINE]; // this array has to be big enough to hold all of the options BitmapText m_textItems[MAX_OPTION_LINES][MAX_VISIBLE_VALUES_PER_LINE]; // this array has to be big enough to hold all of the options
bool m_bRowIsLong[MAX_OPTION_LINES]; // goes off edge of screen bool m_bRowIsLong[MAX_OPTION_LINES]; // goes off edge of screen
+12 -12
View File
@@ -42,16 +42,16 @@ enum {
}; };
OptionRow g_OptionsMenuLines[NUM_OPTIONS_MENU_LINES] = { OptionRow g_OptionsMenuLines[NUM_OPTIONS_MENU_LINES] = {
OptionRow( "", "Appearance Options" ), OptionRow( "", true, "Appearance Options" ),
OptionRow( "", "Autogen Options" ), OptionRow( "", true, "Autogen Options" ),
OptionRow( "", "Background Options" ), OptionRow( "", true, "Background Options" ),
OptionRow( "", "Config Key/Joy Mappings" ), OptionRow( "", true, "Config Key/Joy Mappings" ),
OptionRow( "", "Input Options" ), OptionRow( "", true, "Input Options" ),
OptionRow( "", "Gameplay Options" ), OptionRow( "", true, "Gameplay Options" ),
OptionRow( "", "Graphic Options" ), OptionRow( "", true, "Graphic Options" ),
OptionRow( "", "Machine Options" ), OptionRow( "", true, "Machine Options" ),
// OptionRow( "", "Sound Options" ), // OptionRow( "", true, "Sound Options" ),
OptionRow( "", "Reload Songs/Courses" ), OptionRow( "", true, "Reload Songs/Courses" ),
}; };
ScreenOptionsMenu::ScreenOptionsMenu() : ScreenOptionsMenu::ScreenOptionsMenu() :
@@ -66,10 +66,10 @@ ScreenOptionsMenu::ScreenOptionsMenu() :
GAMESTATE->m_MasterPlayerNumber = PlayerNumber(0); GAMESTATE->m_MasterPlayerNumber = PlayerNumber(0);
Init( Init(
INPUTMODE_BOTH, INPUTMODE_TOGETHER,
g_OptionsMenuLines, g_OptionsMenuLines,
NUM_OPTIONS_MENU_LINES, NUM_OPTIONS_MENU_LINES,
false, true ); true );
m_Menu.m_MenuTimer.Disable(); m_Menu.m_MenuTimer.Disable();
SOUND->PlayMusic( THEME->GetPathToS("ScreenOptionsMenu music") ); SOUND->PlayMusic( THEME->GetPathToS("ScreenOptionsMenu music") );
+68 -15
View File
@@ -42,22 +42,36 @@ enum {
PO_PERSPECTIVE, PO_PERSPECTIVE,
PO_STEP, PO_STEP,
PO_CHARACTER, PO_CHARACTER,
SO_LIFE,
SO_DRAIN,
SO_BAT_LIVES,
SO_FAIL,
SO_ASSIST,
SO_RATE,
SO_AUTOSYNC,
NUM_PLAYER_OPTIONS_LINES NUM_PLAYER_OPTIONS_LINES
}; };
OptionRow g_PlayerOptionsLines[NUM_PLAYER_OPTIONS_LINES] = { OptionRow g_PlayerOptionsLines[NUM_PLAYER_OPTIONS_LINES] = {
OptionRow( "Speed", "x0.25","x0.5","x0.75","x1","x1.5","x2","x3","x5","x8","C200","C300" ), OptionRow( "Speed", false, "x0.25","x0.5","x0.75","x1","x1.5","x2","x3","x5","x8","C200","C300" ),
OptionRow( "Acceler\n-ation", "OFF","BOOST","BRAKE","WAVE","EXPAND","BOOMERANG" ), OptionRow( "Acceler\n-ation", false, "OFF","BOOST","BRAKE","WAVE","EXPAND","BOOMERANG" ),
OptionRow( "Effect", "OFF","DRUNK","DIZZY","MINI","FLIP","TORNADO","TIPSY" ), OptionRow( "Effect", false, "OFF","DRUNK","DIZZY","MINI","FLIP","TORNADO","TIPSY" ),
OptionRow( "Appear\n-ance", "VISIBLE","HIDDEN","SUDDEN","STEALTH","BLINK", "R.VANISH" ), OptionRow( "Appear\n-ance", false, "VISIBLE","HIDDEN","SUDDEN","STEALTH","BLINK", "R.VANISH" ),
OptionRow( "Turn", "OFF","MIRROR","LEFT","RIGHT","SHUFFLE","S.SHUFFLE" ), OptionRow( "Turn", false, "OFF","MIRROR","LEFT","RIGHT","SHUFFLE","S.SHUFFLE" ),
OptionRow( "Trans\n-form", "OFF","LITTLE","WIDE","BIG","QUICK","SKIPPY","MINES" ), OptionRow( "Trans\n-form", false, "OFF","LITTLE","WIDE","BIG","QUICK","SKIPPY","MINES" ),
OptionRow( "Scroll", "STANDARD","REVERSE","SPLIT","ALTERNATE" ), OptionRow( "Scroll", false, "STANDARD","REVERSE","SPLIT","ALTERNATE" ),
OptionRow( "Note\nSkin", "" ), OptionRow( "Note\nSkin", false, "" ),
OptionRow( "Holds", "OFF","ON" ), OptionRow( "Holds", false, "OFF","ON" ),
OptionRow( "Dark", "OFF","ON" ), OptionRow( "Dark", false, "OFF","ON" ),
OptionRow( "Perspec\n-tive", "" ), OptionRow( "Perspec\n-tive", false, "" ),
OptionRow( "Step", "" ), OptionRow( "Step", false, "" ),
OptionRow( "Character", "" ), OptionRow( "Character", false, "" ),
OptionRow( "Life\nType", true, "BAR","BATTERY" ),
OptionRow( "Bar\nDrain", true, "NORMAL","NO RECOVER","SUDDEN DEATH" ),
OptionRow( "Bat\nLives", true, "1","2","3","4","5","6","7","8","9","10" ),
OptionRow( "Fail", true, "ARCADE","END OF SONG","OFF" ),
OptionRow( "Assist\nTick", true, "OFF", "ON" ),
OptionRow( "Rate", true, "0.3x","0.4x","0.5x","0.6x","0.7x","0.8x","0.9x","1.0x","1.1x","1.2x","1.3x","1.4x","1.5x","1.6x","1.7x","1.8x","1.9x","2.0x" ),
OptionRow( "Auto\nAdjust", true, "OFF", "ON" ),
}; };
static const PlayerOptions::Effect ChoosableEffects[] = static const PlayerOptions::Effect ChoosableEffects[] =
@@ -77,10 +91,10 @@ ScreenPlayerOptions::ScreenPlayerOptions() :
LOG->Trace( "ScreenPlayerOptions::ScreenPlayerOptions()" ); LOG->Trace( "ScreenPlayerOptions::ScreenPlayerOptions()" );
Init( Init(
INPUTMODE_PLAYERS, INPUTMODE_INDIVIDUAL,
g_PlayerOptionsLines, g_PlayerOptionsLines,
NUM_PLAYER_OPTIONS_LINES, NUM_PLAYER_OPTIONS_LINES,
true, false ); false );
/* If we're going to "press start for more options" or skipping options /* If we're going to "press start for more options" or skipping options
* entirely, we need a different fade out. XXX: this is a hack */ * entirely, we need a different fade out. XXX: this is a hack */
@@ -270,6 +284,27 @@ void ScreenPlayerOptions::ImportOptions()
/* Why do this? We don't want to erase if we back out. */ /* Why do this? We don't want to erase if we back out. */
// po.Init(); // po.Init();
} }
SongOptions &so = GAMESTATE->m_SongOptions;
m_iSelectedOption[0][SO_LIFE] = so.m_LifeType;
m_iSelectedOption[0][SO_BAT_LIVES] = so.m_iBatteryLives-1;
if ( m_iSelectedOption[0][SO_BAT_LIVES] < 0 )
m_iSelectedOption[0][SO_BAT_LIVES] = 3; // default in case value is invalid
m_iSelectedOption[0][SO_FAIL] = so.m_FailType;
m_iSelectedOption[0][SO_ASSIST] = so.m_bAssistTick;
m_iSelectedOption[0][SO_AUTOSYNC] = so.m_bAutoSync;
m_iSelectedOption[0][SO_RATE] = 7; // in case we don't match below
for( i=0; i<g_PlayerOptionsLines[SO_RATE].choices.size(); i++ )
{
float fThisRate = (float) atof(g_PlayerOptionsLines[SO_RATE].choices[i]);
if( fThisRate == so.m_fMusicRate )
m_iSelectedOption[0][SO_RATE] = i;
}
} }
void ScreenPlayerOptions::ExportOptions() void ScreenPlayerOptions::ExportOptions()
@@ -383,6 +418,24 @@ void ScreenPlayerOptions::ExportOptions()
GAMESTATE->m_pCurCharacters[p] = GAMESTATE->m_pCharacters[choice]; GAMESTATE->m_pCurCharacters[p] = GAMESTATE->m_pCharacters[choice];
} }
} }
SongOptions &so = GAMESTATE->m_SongOptions;
so.m_LifeType = (SongOptions::LifeType)m_iSelectedOption[0][SO_LIFE];
so.m_DrainType = (SongOptions::DrainType)m_iSelectedOption[0][SO_DRAIN];
so.m_iBatteryLives = m_iSelectedOption[0][SO_BAT_LIVES]+1;
if( so.m_FailType != (SongOptions::FailType)m_iSelectedOption[0][SO_FAIL] )
{
/* The user is changing the fail mode explicitly; stop messing with it. */
GAMESTATE->m_bChangedFailType = true;
so.m_FailType = (SongOptions::FailType)m_iSelectedOption[0][SO_FAIL];
}
so.m_bAssistTick = !!m_iSelectedOption[0][SO_ASSIST];
so.m_bAutoSync = !!m_iSelectedOption[0][SO_AUTOSYNC];
int iSel = m_iSelectedOption[0][SO_RATE];
so.m_fMusicRate = (float) atof( g_PlayerOptionsLines[SO_RATE].choices[iSel] );
} }
void ScreenPlayerOptions::GoToPrevState() void ScreenPlayerOptions::GoToPrevState()
+5 -5
View File
@@ -33,9 +33,9 @@ enum {
}; };
OptionRow g_RaveOptionsLines[NUM_RAVE_OPTIONS_LINES] = { OptionRow g_RaveOptionsLines[NUM_RAVE_OPTIONS_LINES] = {
OptionRow( "P1 Super\nGrowth", "25%","50%","75%","100%","125%","150%","175%","200%" ), OptionRow( "P1 Super\nGrowth", true, "25%","50%","75%","100%","125%","150%","175%","200%" ),
OptionRow( "P2 Super\nGrowth", "25%","50%","75%","100%","125%","150%","175%","200%" ), OptionRow( "P2 Super\nGrowth", true, "25%","50%","75%","100%","125%","150%","175%","200%" ),
OptionRow( "CPU\nSkill", "-5","-4","-3","-2","-1","DEFAULT","+1","+2","+3","+4","+5" ) OptionRow( "CPU\nSkill", true, "-5","-4","-3","-2","-1","DEFAULT","+1","+2","+3","+4","+5" )
}; };
PlayerNumber OPPOSITE_PLAYER[NUM_PLAYERS] = { PLAYER_2, PLAYER_1 }; PlayerNumber OPPOSITE_PLAYER[NUM_PLAYERS] = { PLAYER_2, PLAYER_1 };
@@ -47,10 +47,10 @@ ScreenRaveOptions::ScreenRaveOptions() :
bool bComputerPlayersPresent = GAMESTATE->GetNumSidesJoined()==1; bool bComputerPlayersPresent = GAMESTATE->GetNumSidesJoined()==1;
Init( Init(
INPUTMODE_BOTH, INPUTMODE_TOGETHER,
g_RaveOptionsLines, g_RaveOptionsLines,
bComputerPlayersPresent ? 3 : 1, bComputerPlayersPresent ? 3 : 1,
false, false ); false );
} }
void ScreenRaveOptions::ImportOptions() void ScreenRaveOptions::ImportOptions()
+3 -3
View File
@@ -29,7 +29,7 @@ enum {
OptionRow g_SelectGameLines[NUM_SELECT_GAME_LINES] = OptionRow g_SelectGameLines[NUM_SELECT_GAME_LINES] =
{ {
OptionRow( "Game" ), OptionRow( "Game", true ),
}; };
@@ -52,10 +52,10 @@ ScreenSelectGame::ScreenSelectGame() :
} }
Init( Init(
INPUTMODE_BOTH, INPUTMODE_TOGETHER,
g_SelectGameLines, g_SelectGameLines,
NUM_SELECT_GAME_LINES, NUM_SELECT_GAME_LINES,
false, true ); true );
m_Menu.m_MenuTimer.Disable(); m_Menu.m_MenuTimer.Disable();
SOUND->PlayMusic( THEME->GetPathToS("ScreenSelectGame music") ); SOUND->PlayMusic( THEME->GetPathToS("ScreenSelectGame music") );
+9 -9
View File
@@ -34,13 +34,13 @@ enum {
}; };
OptionRow g_SongOptionsLines[NUM_SONG_OPTIONS_LINES] = { OptionRow g_SongOptionsLines[NUM_SONG_OPTIONS_LINES] = {
OptionRow( "Life\nType", "BAR","BATTERY" ), OptionRow( "Life\nType", true, "BAR","BATTERY" ),
OptionRow( "Bar\nDrain", "NORMAL","NO RECOVER","SUDDEN DEATH" ), OptionRow( "Bar\nDrain", true, "NORMAL","NO RECOVER","SUDDEN DEATH" ),
OptionRow( "Bat\nLives", "1","2","3","4","5","6","7","8","9","10" ), OptionRow( "Bat\nLives", true, "1","2","3","4","5","6","7","8","9","10" ),
OptionRow( "Fail", "ARCADE","END OF SONG","OFF" ), OptionRow( "Fail", true, "ARCADE","END OF SONG","OFF" ),
OptionRow( "Assist\nTick", "OFF", "ON" ), OptionRow( "Assist\nTick", true, "OFF", "ON" ),
OptionRow( "Rate", "0.3x","0.4x","0.5x","0.6x","0.7x","0.8x","0.9x","1.0x","1.1x","1.2x","1.3x","1.4x","1.5x","1.6x","1.7x","1.8x","1.9x","2.0x" ), OptionRow( "Rate", true, "0.3x","0.4x","0.5x","0.6x","0.7x","0.8x","0.9x","1.0x","1.1x","1.2x","1.3x","1.4x","1.5x","1.6x","1.7x","1.8x","1.9x","2.0x" ),
OptionRow( "Auto\nAdjust", "OFF", "ON" ), OptionRow( "Auto\nAdjust", true, "OFF", "ON" ),
}; };
/* Get the next screen we'll go to when finished. */ /* Get the next screen we'll go to when finished. */
@@ -55,10 +55,10 @@ ScreenSongOptions::ScreenSongOptions() :
{ {
LOG->Trace( "ScreenSongOptions::ScreenSongOptions()" ); LOG->Trace( "ScreenSongOptions::ScreenSongOptions()" );
Init( INPUTMODE_BOTH, Init( INPUTMODE_TOGETHER,
g_SongOptionsLines, g_SongOptionsLines,
NUM_SONG_OPTIONS_LINES, NUM_SONG_OPTIONS_LINES,
false, false ); false );
/* If we're coming in from "press start for more options", we need a different /* If we're coming in from "press start for more options", we need a different
* fade in. XXX: this is a hack */ * fade in. XXX: this is a hack */
+2 -2
View File
@@ -36,7 +36,7 @@ OptionRow g_SoundOptionsLines[NUM_SOUND_OPTIONS_LINES] = {
* users, except to troubleshoot clipping; that's why I didn't put it in * users, except to troubleshoot clipping; that's why I didn't put it in
* the options to begin with. */ * the options to begin with. */
// OptionRow( "Master\nVolume", "MUTE","20%","40%","60%","80%","100%" ), // OptionRow( "Master\nVolume", "MUTE","20%","40%","60%","80%","100%" ),
OptionRow( "Preload\nSounds", "NO","YES" ), OptionRow( "Preload\nSounds", true, "NO","YES" ),
}; };
ScreenSoundOptions::ScreenSoundOptions() : ScreenSoundOptions::ScreenSoundOptions() :
@@ -44,7 +44,7 @@ ScreenSoundOptions::ScreenSoundOptions() :
{ {
LOG->Trace( "ScreenSoundOptions::ScreenSoundOptions()" ); LOG->Trace( "ScreenSoundOptions::ScreenSoundOptions()" );
Init( INPUTMODE_BOTH, g_SoundOptionsLines, NUM_SOUND_OPTIONS_LINES, false, true ); Init( INPUTMODE_TOGETHER, g_SoundOptionsLines, NUM_SOUND_OPTIONS_LINES, true );
m_Menu.m_MenuTimer.Disable(); m_Menu.m_MenuTimer.Disable();
SOUND->PlayMusic( THEME->GetPathToS("ScreenSoundOptions music") ); SOUND->PlayMusic( THEME->GetPathToS("ScreenSoundOptions music") );