A persistent initial FailType now set in MachineOptions, but the temporary session FailType can be changed in SongOptions

This commit is contained in:
Chris Danford
2003-02-12 23:11:37 +00:00
parent 876a3f4499
commit 707b4fe817
13 changed files with 52 additions and 33 deletions
+8 -6
View File
@@ -744,7 +744,7 @@ 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.
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.
Fail=Choose the conditions for game over.::LIFE DRAINED 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.
ShowStats=Display Performance Statistics in the upper right corner::of the screen. FPS = frames per second.::TPF = triangles per frame. DPF = draws per frame.
CoinMode=When set to HOME, options will be shown on the title screen.::When set to PAY the title menu choices are hidden and you must::insert coins before joining in. When set to FREE the title menu::choices are hidden and you can joining in without inserting coins.
CoinsPerCredit=The number of coins that must be inserted before a player can join.
@@ -797,21 +797,23 @@ LineSpacingX=0
LineSpacingY=60
BulletsStartX=100
BulletsStartY=140
TextZoom=1.0
TextColor=0.8,0.8,1,1
NamesStartX=180
NamesStartY=140
NamesZoom=1.2
NamesColor=0.8,0.8,1,1
ScoresStartX=520
ScoresStartY=140
ScoresZoom=1.2
ScoresColor=0.8,0.8,1,1
PointsStartX=380
PointsStartY=140
TimeStartX=560
TimeStartY=140
SecondsPerPage=5
ShowCategories=1
CoursesToShow=Courses/NaokiStandard.crs,Courses/ParanoiaBrothers.crs
NotesTypesToHide=dance-couple,dance-solo
[ScreenIntroMovie]
SecondsToShow=15
SecondsToShow=0
NextScreen=ScreenDemonstration
[ScreenMemoryCard]
+2 -2
View File
@@ -39,8 +39,8 @@ Course::Course()
for( i=0; i<NUM_NOTES_TYPES; i++ )
for( j=0; j<NUM_RANKING_LINES; j++ )
{
m_MachineScores[i][j].iDancePoints = 0;
m_MachineScores[i][j].fSurviveTime = 0;
m_MachineScores[i][j].iDancePoints = 573;
m_MachineScores[i][j].fSurviveTime = 57.3f;
m_MachineScores[i][j].sName = "STEP";
}
+2
View File
@@ -87,6 +87,8 @@ void GameState::Reset()
for( p=0; p<NUM_PLAYERS; p++ )
m_PlayerOptions[p] = PlayerOptions();
m_SongOptions = SongOptions();
if( PREFSMAN )
m_SongOptions.m_FailType = PREFSMAN->m_DefaultFailType;
}
void GameState::ResetLastRanking()
+3 -3
View File
@@ -84,7 +84,7 @@ PrefsManager::PrefsManager()
m_iBoostAppPriority = -1;
m_iPolygonRadar = -1;
m_bShowSongOptions = true;
m_FailType = FAIL_ARCADE;
m_DefaultFailType = SongOptions::FAIL_ARCADE;
/* DDR Extreme-style extra stage support. *
* Default off so people used to the current behavior (or those with extra *
@@ -170,7 +170,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame )
ini.GetValueF( "Options", "LongVerSeconds", m_fLongVerSongSeconds );
ini.GetValueF( "Options", "MarathonVerSeconds", m_fMarathonVerSongSeconds );
ini.GetValueB( "Options", "ShowSongOptions", m_bShowSongOptions );
ini.GetValueI( "Options", "FailType", (int&)m_FailType );
ini.GetValueI( "Options", "DefaultFailType", (int&)m_DefaultFailType );
m_asAdditionalSongFolders.clear();
@@ -243,7 +243,7 @@ void PrefsManager::SaveGlobalPrefsToDisk()
ini.SetValueF( "Options", "LongVerSeconds", m_fLongVerSongSeconds );
ini.SetValueF( "Options", "MarathonVerSeconds", m_fMarathonVerSongSeconds );
ini.SetValueB( "Options", "ShowSongOptions", m_bShowSongOptions );
ini.SetValueI( "Options", "FailType", (int&)m_FailType );
ini.SetValueI( "Options", "DefaultFailType", (int&)m_DefaultFailType );
/* Only write these if they aren't the default. This ensures that we can change
* the default and have it take effect for everyone (except people who
+2 -2
View File
@@ -11,7 +11,7 @@
Chris Gomez
-----------------------------------------------------------------------------
*/
#include "SongOptions.h"
class PrefsManager
{
@@ -68,7 +68,7 @@ public:
float m_fLongVerSongSeconds;
float m_fMarathonVerSongSeconds;
bool m_bShowSongOptions;
enum { FAIL_ARCADE=0, FAIL_END_OF_SONG, FAIL_OFF } m_FailType;
SongOptions::FailType m_DefaultFailType;
/* 0 = no; 1 = yes; -1 = auto (do whatever is appropriate for the arch). */
int m_iBoostAppPriority;
+2 -2
View File
@@ -100,7 +100,7 @@ bool SetUpSongOptions() // always return true.
GAMESTATE->m_PlayerOptions[p].m_bEffects[ PlayerOptions::EFFECT_MINI ] = true;
}
GAMESTATE->m_SongOptions.m_LifeType = SongOptions::LIFE_BATTERY;
PREFSMAN->m_FailType = PrefsManager::FAIL_OFF;
GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_OFF;
}
for( int p=0; p<NUM_PLAYERS; p++ )
@@ -115,7 +115,7 @@ bool SetUpSongOptions() // always return true.
GAMESTATE->m_SongOptions = SongOptions();
GAMESTATE->m_SongOptions.m_LifeType = (randomf(0,1)>0.8f) ? SongOptions::LIFE_BATTERY : SongOptions::LIFE_BAR;
PREFSMAN->m_FailType = PrefsManager::FAIL_OFF;
GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_OFF;
GAMESTATE->m_bDemonstration = true;
+5 -5
View File
@@ -775,9 +775,9 @@ void ScreenGameplay::Update( float fDeltaTime )
//
// check for fail
//
switch( PREFSMAN->m_FailType )
switch( GAMESTATE->m_SongOptions.m_FailType )
{
case PrefsManager::FAIL_ARCADE:
case SongOptions::FAIL_ARCADE:
switch( GAMESTATE->m_SongOptions.m_LifeType )
{
case SongOptions::LIFE_BAR:
@@ -821,8 +821,8 @@ void ScreenGameplay::Update( float fDeltaTime )
break;
}
break;
case PrefsManager::FAIL_END_OF_SONG:
case PrefsManager::FAIL_OFF:
case SongOptions::FAIL_END_OF_SONG:
case SongOptions::FAIL_OFF:
break; // don't check for fail
default:
ASSERT(0);
@@ -1274,7 +1274,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
return; // ignore
m_DancingState = STATE_OUTRO;
if( PREFSMAN->m_FailType == PrefsManager::FAIL_END_OF_SONG && AllFailedEarlier() )
if( GAMESTATE->m_SongOptions.m_FailType == SongOptions::FAIL_END_OF_SONG && AllFailedEarlier() )
{
this->SendScreenMessage( SM_BeginFailed, 0 );
return;
+2 -2
View File
@@ -93,7 +93,7 @@ bool PrepareForJukebox() // always return true.
GAMESTATE->m_PlayerOptions[p].m_bEffects[ PlayerOptions::EFFECT_MINI ] = true;
}
GAMESTATE->m_SongOptions.m_LifeType = SongOptions::LIFE_BATTERY;
PREFSMAN->m_FailType = PrefsManager::FAIL_OFF;
GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_OFF;
}
for( int p=0; p<NUM_PLAYERS; p++ )
@@ -110,7 +110,7 @@ bool PrepareForJukebox() // always return true.
GAMESTATE->m_SongOptions = SongOptions();
GAMESTATE->m_SongOptions.m_LifeType = (randomf(0,1)>0.8f) ? SongOptions::LIFE_BATTERY : SongOptions::LIFE_BAR;
PREFSMAN->m_FailType = PrefsManager::FAIL_OFF;
GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_OFF;
GAMESTATE->m_bDemonstration = true;
+7 -7
View File
@@ -43,7 +43,7 @@ OptionRowData g_MachineOptionsLines[NUM_MACHINE_OPTIONS_LINES] = {
{ "Arcade\nStages", 8, {"1","2","3","4","5","6","7","UNLIMITED"} },
{ "Judge\nDifficulty", 8, {"1","2","3","4","5","6","7","8"} },
{ "Life\nDifficulty", 7, {"1","2","3","4","5","6","7"} },
{ "Fail", 3, {"LIFE DRAINED","END OF SONG","OFF"} },
{ "Default\nFail Type", 3, {"ARCADE","END OF SONG","OFF"} },
{ "Show\nStats", 2, {"OFF","ON"} },
{ "Coin\nMode", 3, {"HOME","PAY","FREE PLAY"} },
{ "Coins Per\nCredit", 8, {"1","2","3","4","5","6","7","8"} },
@@ -111,7 +111,7 @@ void ScreenMachineOptions::ImportOptions()
else if( PREFSMAN->m_fLifeDifficultyScale == 0.40f ) m_iSelectedOption[0][MO_LIFE_DIFFICULTY] = 6;
else m_iSelectedOption[0][MO_LIFE_DIFFICULTY] = 3;
m_iSelectedOption[0][MO_FAIL] = PREFSMAN->m_FailType;
m_iSelectedOption[0][MO_FAIL] = PREFSMAN->m_DefaultFailType;
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;
@@ -149,11 +149,11 @@ void ScreenMachineOptions::ExportOptions()
default: ASSERT(0);
}
(int&)PREFSMAN->m_FailType = m_iSelectedOption[0][MO_FAIL];
PREFSMAN->m_bShowStats = m_iSelectedOption[0][MO_SHOWSTATS] == 1;
(int&)PREFSMAN->m_CoinMode = m_iSelectedOption[0][MO_COIN_MODE];
PREFSMAN->m_iCoinsPerCredit = m_iSelectedOption[0][MO_COINS_PER_CREDIT] + 1;
PREFSMAN->m_bJointPremium = m_iSelectedOption[0][MO_JOINT_PREMIUM] == 1;
(int&)PREFSMAN->m_DefaultFailType = m_iSelectedOption[0][MO_FAIL];
PREFSMAN->m_bShowStats = m_iSelectedOption[0][MO_SHOWSTATS] == 1;
(int&)PREFSMAN->m_CoinMode = m_iSelectedOption[0][MO_COIN_MODE];
PREFSMAN->m_iCoinsPerCredit = m_iSelectedOption[0][MO_COINS_PER_CREDIT] + 1;
PREFSMAN->m_bJointPremium = m_iSelectedOption[0][MO_JOINT_PREMIUM] == 1;
}
void ScreenMachineOptions::GoToPrevState()
+4 -4
View File
@@ -559,7 +559,7 @@ void ScreenSelectMusic::AdjustOptions()
/* In event mode, switch to fail-end-of-stage if either chose beginner or easy. */
if(PREFSMAN->m_bEventMode && dc <= DIFFICULTY_EASY)
PREFSMAN->m_FailType = PrefsManager::FAIL_END_OF_SONG;
GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_END_OF_SONG;
/* Otherwise, if either chose beginner's steps, and this is the first stage,
* turn off failure completely (always give a second shot). */
@@ -567,13 +567,13 @@ void ScreenSelectMusic::AdjustOptions()
{
/* Beginners get a freebie and then end-of-song. */
if(GAMESTATE->m_iCurrentStageIndex == 0)
PREFSMAN->m_FailType = PrefsManager::FAIL_OFF;
GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_OFF;
else if(!GAMESTATE->IsExtraStage() && !GAMESTATE->IsExtraStage2())
PREFSMAN->m_FailType = PrefsManager::FAIL_END_OF_SONG;
GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_END_OF_SONG;
}
/* Easy is always end-of-song. */
else if(dc == DIFFICULTY_EASY && !GAMESTATE->IsExtraStage() && !GAMESTATE->IsExtraStage2())
PREFSMAN->m_FailType = PrefsManager::FAIL_END_OF_SONG;
GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_END_OF_SONG;
}
void ScreenSelectMusic::HandleScreenMessage( const ScreenMessage SM )
+4
View File
@@ -24,6 +24,7 @@ enum {
SO_LIFE = 0,
SO_DRAIN,
SO_BAT_LIVES,
SO_FAIL,
SO_ASSIST,
SO_RATE,
SO_AUTOSYNC,
@@ -34,6 +35,7 @@ OptionRowData g_SongOptionsLines[NUM_SONG_OPTIONS_LINES] = {
{ "Life\nType", 2, {"BAR","BATTERY"} },
{ "Bar\nDrain", 3, {"NORMAL","NO RECOVER","SUDDEN DEATH"} },
{ "Bat\nLives", 10, {"1","2","3","4","5","6","7","8","9","10"} },
{ "Fail", 3, {"ARCADE","END OF SONG","OFF"} },
{ "Assist", 2, {"OFF","TICK"} },
{ "Rate", 9, {"x0.7","x0.8","x0.9","x1.0","x1.1","x1.2","x1.3","x1.4","x1.5"} },
{ "Auto\nAdjust", 2, {"OFF", "ON"} },
@@ -61,6 +63,7 @@ void ScreenSongOptions::ImportOptions()
m_iSelectedOption[0][SO_LIFE] = so.m_LifeType;
m_iSelectedOption[0][SO_BAT_LIVES] = so.m_iBatteryLives-1;
m_iSelectedOption[0][SO_FAIL] = so.m_FailType;
m_iSelectedOption[0][SO_ASSIST] = so.m_AssistType;
m_iSelectedOption[0][SO_AUTOSYNC] = so.m_bAutoSync;
@@ -83,6 +86,7 @@ void ScreenSongOptions::ExportOptions()
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;
so.m_FailType = (SongOptions::FailType)m_iSelectedOption[0][SO_FAIL];
so.m_AssistType = (SongOptions::AssistType)m_iSelectedOption[0][SO_ASSIST];
so.m_bAutoSync = m_iSelectedOption[0][SO_AUTOSYNC] != 0;
+8
View File
@@ -33,6 +33,14 @@ CString SongOptions::GetString()
break;
}
switch( m_FailType )
{
case FAIL_ARCADE: break;
case FAIL_END_OF_SONG: sReturn += "FailEndOfSong, "; break;
case FAIL_OFF: sReturn += "FailOff, "; break;
}
if( m_fMusicRate != 1 )
{
CString s = ssprintf( "%2.2f", m_fMusicRate );
+3
View File
@@ -20,6 +20,8 @@ struct SongOptions
enum DrainType { DRAIN_NORMAL, DRAIN_NO_RECOVER, DRAIN_SUDDEN_DEATH };
DrainType m_DrainType; // only used with LifeBar
int m_iBatteryLives;
enum FailType { FAIL_ARCADE=0, FAIL_END_OF_SONG, FAIL_OFF };
FailType m_FailType;
enum AssistType { ASSIST_NONE=0, ASSIST_TICK };
AssistType m_AssistType;
float m_fMusicRate;
@@ -31,6 +33,7 @@ struct SongOptions
m_LifeType = LIFE_BAR;
m_DrainType = DRAIN_NORMAL;
m_iBatteryLives = 4;
m_FailType = FAIL_ARCADE;
m_AssistType = ASSIST_NONE;
m_fMusicRate = 1.0f;
m_bAutoSync = false;