diff --git a/src/GameCommand.cpp b/src/GameCommand.cpp index 4d9aa65b80..dc474abed7 100644 --- a/src/GameCommand.cpp +++ b/src/GameCommand.cpp @@ -59,7 +59,6 @@ void GameCommand::Init() m_sProfileID = ""; m_sUrl = ""; m_bUrlExits = true; - m_bPushScreen = false; m_bInsertCredit = false; m_bClearCredits = false; @@ -242,7 +241,6 @@ void GameCommand::LoadOne( const Command& cmd ) else if( sName == "screen" ) { m_sScreen = sValue; - m_bPushScreen = false; } else if( sName == "song" ) @@ -412,12 +410,6 @@ void GameCommand::LoadOne( const Command& cmd ) } } - else if( sName == "pushscreen" ) - { - m_sScreen = sValue; - m_bPushScreen = true; - } - else if( sName == "fademusic" ) { // todo: parse things correctly. -aj @@ -573,7 +565,7 @@ bool GameCommand::IsPlayable( RString *why ) const } } - if( !m_sScreen.CompareNoCase("ScreenEditCoursesMenu") && !m_bPushScreen ) + if( !m_sScreen.CompareNoCase("ScreenEditCoursesMenu") ) { vector vCourses; SONGMAN->GetAllCourses( vCourses, false ); @@ -588,8 +580,7 @@ bool GameCommand::IsPlayable( RString *why ) const if( (!m_sScreen.CompareNoCase("ScreenJukeboxMenu") || !m_sScreen.CompareNoCase("ScreenEditMenu") || - !m_sScreen.CompareNoCase("ScreenEditCoursesMenu")) && - !m_bPushScreen) + !m_sScreen.CompareNoCase("ScreenEditCoursesMenu")) ) { if( SONGMAN->GetNumSongs() == 0 ) { @@ -727,10 +718,8 @@ void GameCommand::ApplySelf( const vector &vpns ) const } LUA->Release(L); } - if( m_sScreen != "" && m_bApplyCommitsScreens && !m_bPushScreen ) + if( m_sScreen != "" && m_bApplyCommitsScreens ) SCREENMAN->SetNewScreen( m_sScreen ); - if( m_sScreen != "" && m_bApplyCommitsScreens && m_bPushScreen ) - SCREENMAN->AddNewScreenToTop( m_sScreen ); if( m_pSong ) { GAMESTATE->m_pCurSong.Set( m_pSong ); diff --git a/src/GameCommand.h b/src/GameCommand.h index a658eb904a..53affd897c 100644 --- a/src/GameCommand.h +++ b/src/GameCommand.h @@ -80,7 +80,6 @@ public: RString m_sUrl; // sm-ssc adds: bool m_bUrlExits; // for making stepmania not exit on url - bool m_bPushScreen; // for pushing a screen on top instead of as next bool m_bInsertCredit; bool m_bClearCredits; diff --git a/src/PlayerState.cpp b/src/PlayerState.cpp index 31c081c45e..16dfad8900 100644 --- a/src/PlayerState.cpp +++ b/src/PlayerState.cpp @@ -246,6 +246,7 @@ public: LuaHelpers::CreateTableFromArray( s, L ); return 1; } + DEFINE_METHOD( GetHealthState, m_HealthState ); LunaPlayerState() { @@ -254,6 +255,7 @@ public: ADD_METHOD( SetPlayerOptions ); ADD_METHOD( GetPlayerOptions ); ADD_METHOD( GetPlayerOptionsArray ); + ADD_METHOD( GetHealthState ); } }; diff --git a/src/ScreenNetEvaluation.cpp b/src/ScreenNetEvaluation.cpp index 03fb4286fb..7a75a0f09a 100644 --- a/src/ScreenNetEvaluation.cpp +++ b/src/ScreenNetEvaluation.cpp @@ -219,6 +219,9 @@ void ScreenNetEvaluation::UpdateStats() Message msg("UpdateNetEvalStats"); msg.SetParam( "ActivePlayerIndex", m_pActivePlayer ); msg.SetParam( "Difficulty", NSMAN->m_EvalPlayerData[m_iCurrentPlayer].difficulty ); + msg.SetParam( "Score", NSMAN->m_EvalPlayerData[m_iCurrentPlayer].score ); + msg.SetParam( "Grade", NSMAN->m_EvalPlayerData[m_iCurrentPlayer].grade ); + msg.SetParam( "PlayerOptions", NSMAN->m_EvalPlayerData[m_iCurrentPlayer].playerOptions ); if( pSteps ) msg.SetParam( "Steps", pSteps ); MESSAGEMAN->Broadcast(msg); diff --git a/src/ScreenOptionsMasterPrefs.cpp b/src/ScreenOptionsMasterPrefs.cpp index 471dcdfcad..1ecfe4e4ca 100644 --- a/src/ScreenOptionsMasterPrefs.cpp +++ b/src/ScreenOptionsMasterPrefs.cpp @@ -38,6 +38,7 @@ static void SetPrefsDefaultModifiers( const PlayerOptions &po, const SongOptions PREFSMAN->m_sDefaultModifiers.Set( join(", ",as) ); } + /* Ugly: the input values may be a different type than the mapping. For example, * the mapping may be an enum, and value an int. This is because we don't * have FromString/ToString for every enum type. Assume that the distance between @@ -156,6 +157,8 @@ static void MoveNop( int &iSel, bool bToSel, const ConfOption *pConfOption ) iSel = 0; } +// TODO: Write GenerateValueList() function that can use ints and floats. -aj + static void GameChoices( vector &out ) { vector aGames; @@ -184,12 +187,11 @@ static void GameSel( int &sel, bool ToSel, const ConfOption *pConfOption ) vector aGames; GAMEMAN->GetEnabledGames( aGames ); StepMania::ChangeCurrentGame( aGames[sel] ); - /* XXX: reload metrics to force a refresh of - * CommonMetrics::DIFFICULTIES_TO_SHOW, mainly if we're not switching - * themes. I'm not sure if this was the case going from theme to theme, - * but if it was, it should be fixed now. There should probably be a - * better way than this, but I'm not sure what it'd be. -aj - */ + /* Reload metrics to force a refresh of CommonMetrics::DIFFICULTIES_TO_SHOW, + * mainly if we're not switching themes. I'm not sure if this was the + * case going from theme to theme, but if it was, it should be fixed + * now. There's probably be a better way to do it, but I'm not sure + * what it'd be. -aj */ THEME->ReloadMetrics(); } } @@ -431,13 +433,15 @@ static void SongsPerPlayOrEventMode( int &sel, bool ToSel, const ConfOption *pCo // Machine options static void TimingWindowScale( int &sel, bool ToSel, const ConfOption *pConfOption ) { - const float mapping[] = { 2.0f,1.66f,1.33f,1.00f,0.75f,0.50f,0.25f }; + //const float mapping[] = { 2.0f,1.66f,1.33f,1.00f,0.75f,0.50f,0.25f }; + const float mapping[] = { 1.50f,1.33f,1.16f,1.00f,0.84f,0.66f,0.50f,0.33f,0.20f }; MoveMap( sel, pConfOption, ToSel, mapping, ARRAYLEN(mapping) ); } static void LifeDifficulty( int &sel, bool ToSel, const ConfOption *pConfOption ) { - const float mapping[] = { 2.0f,1.50f,1.00f,0.66f,0.33f }; + //const float mapping[] = { 2.0f,1.50f,1.00f,0.66f,0.33f }; + const float mapping[] = { 1.60f,1.40f,1.20f,1.00f,0.80f,0.60f,0.40f }; MoveMap( sel, pConfOption, ToSel, mapping, ARRAYLEN(mapping) ); } diff --git a/src/StatsManager.cpp b/src/StatsManager.cpp index 0f372178aa..4adb292214 100644 --- a/src/StatsManager.cpp +++ b/src/StatsManager.cpp @@ -202,11 +202,9 @@ XNode* MakeRecentScoreNode( const StageStats &ss, Trail *pTrail, const PlayerSta void StatsManager::CommitStatsToProfiles( const StageStats *pSS ) { - // // Add step totals. Use radarActual, since the player might have failed part way // through the song, in which case we don't want to give credit for the rest of the // song. - // FOREACH_HumanPlayer( pn ) { int iNumTapsAndHolds = (int) pSS->m_player[pn].m_radarActual[RadarCategory_TapsAndHolds];