From f9a25062f6d0b5181c2ce402716052c2136558ad Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Fri, 13 May 2011 00:40:10 -0400 Subject: [PATCH 01/17] [splittiming] Don't show routine key on non. Hmm...does mercurial offer a cherry pick command? --- src/ScreenEdit.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ScreenEdit.cpp b/src/ScreenEdit.cpp index 617d0140b5..0c87f457f8 100644 --- a/src/ScreenEdit.cpp +++ b/src/ScreenEdit.cpp @@ -4227,6 +4227,13 @@ void ScreenEdit::DoHelp() RString sButtons = GetDeviceButtonsLocalized( hl.veb, m_EditMappingsDeviceInput ); RString sDescription = THEME->GetString( "EditHelpDescription", hl.szEnglishDescription ); + + // TODO: Better way of hiding routine only key on non-routine. + if( sDescription.Left(13) == "Switch player" && m_InputPlayerNumber == PLAYER_INVALID ) + { + continue; + } + g_EditHelp.rows.push_back( MenuRowDef( -1, sDescription, false, EditMode_Practice, false, false, 0, sButtons ) ); } From c33b400c9380ed24240c3e81d0d240fecceab306 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Fri, 13 May 2011 00:49:59 -0400 Subject: [PATCH 02/17] Transplant latest doxygen from [splittiming]. --- src/ScreenEdit.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ScreenEdit.h b/src/ScreenEdit.h index ea10ca22a2..4de415230b 100644 --- a/src/ScreenEdit.h +++ b/src/ScreenEdit.h @@ -71,8 +71,8 @@ enum EditButton EDIT_BUTTON_SCROLL_NEXT, EDIT_BUTTON_SCROLL_PREV, - EDIT_BUTTON_LABEL_NEXT, - EDIT_BUTTON_LABEL_PREV, + EDIT_BUTTON_LABEL_NEXT, /**< Jump to the start of the next label downward. */ + EDIT_BUTTON_LABEL_PREV, /**< Jump to the start of the previous label upward. */ // These are modifiers to EDIT_BUTTON_SCROLL_*. EDIT_BUTTON_SCROLL_SELECT, From 4d9e2417f637decffba816f21d8fd0fd8ca48ac6 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Fri, 13 May 2011 15:25:19 -0400 Subject: [PATCH 03/17] Bring in language update from [splittiming]. --- Themes/_fallback/Languages/en.ini | 4 ++-- src/ScreenEdit.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Themes/_fallback/Languages/en.ini b/Themes/_fallback/Languages/en.ini index d0492d5a94..89502509c8 100644 --- a/Themes/_fallback/Languages/en.ini +++ b/Themes/_fallback/Languages/en.ini @@ -983,8 +983,8 @@ Set modifiers=Set modifiers Set Mods=Set Mods Set selection start=Set selection start Set selection end=Set selection end -Shift pauses and BPM changes down=Shift pauses and BPM changes down -Shift pauses and BPM changes up=Shift pauses and BPM changes up +Shift all timing changes down=Shift all timing changes down +Shift all timing changes up=Shift all timing changes up ShowBanners=Show Banners ShowBeginnerHelper=Beginner Helper ShowCaution=Caution diff --git a/src/ScreenEdit.cpp b/src/ScreenEdit.cpp index 0c87f457f8..9d1e462c83 100644 --- a/src/ScreenEdit.cpp +++ b/src/ScreenEdit.cpp @@ -510,8 +510,8 @@ static MenuDef g_AreaMenu( MenuRowDef( ScreenEdit::record, "Record in selection", true, EditMode_Practice, true, true, 0, NULL ), MenuRowDef( ScreenEdit::insert_and_shift, "Insert beat and shift down", true, EditMode_Practice, true, true, 0, NULL ), MenuRowDef( ScreenEdit::delete_and_shift, "Delete beat and shift up", true, EditMode_Practice, true, true, 0, NULL ), - MenuRowDef( ScreenEdit::shift_pauses_forward, "Shift pauses and BPM changes down", true, EditMode_Full, true, true, 0, NULL ), - MenuRowDef( ScreenEdit::shift_pauses_backward, "Shift pauses and BPM changes up", true, EditMode_Full, true, true, 0, NULL ), + MenuRowDef( ScreenEdit::shift_pauses_forward, "Shift all timing changes down", true, EditMode_Full, true, true, 0, NULL ), + MenuRowDef( ScreenEdit::shift_pauses_backward, "Shift all timing changes up", true, EditMode_Full, true, true, 0, NULL ), MenuRowDef( ScreenEdit::convert_to_pause, "Convert selection to pause", true, EditMode_Full, true, true, 0, NULL ), MenuRowDef( ScreenEdit::convert_pause_to_beat, "Convert pause to beats", true, EditMode_Full, true, true, 0, NULL ), MenuRowDef( ScreenEdit::undo, "Undo", true, EditMode_Practice, true, true, 0, NULL ) From f845dbc23200e3fdff6dbb3294aa2b6eb1f4fe0a Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Sat, 14 May 2011 12:44:59 -0400 Subject: [PATCH 04/17] Bring in the scoring fix from [splittiming]. --- Themes/_fallback/Scripts/04 Scoring.lua | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Themes/_fallback/Scripts/04 Scoring.lua b/Themes/_fallback/Scripts/04 Scoring.lua index 1c8c8df8b5..120177cd4d 100644 --- a/Themes/_fallback/Scripts/04 Scoring.lua +++ b/Themes/_fallback/Scripts/04 Scoring.lua @@ -89,11 +89,14 @@ r['DDR Extreme'] = function(params, pss) local totalItems = GetTotalItems(radarValues); local singleStep = (1 + totalItems) * totalItems / 2; if (not Shared.CurrentStep) then - Shared.CurrentStep = 0 + Shared.CurrentStep = {}; + Shared.CurrentStep["P1"] = 0; + Shared.CurrentStep["P2"] = 0; end; - Shared.CurrentStep = Shared.CurrentStep + 1; + local pn = PlayerNumberToString(params.Player); + Shared.CurrentStep[pn] = Shared.CurrentStep[pn] + 1; local stepValue = math.floor(baseScore /singleStep); - local stepLast = stepValue * Shared.CurrentStep; + local stepLast = stepValue * Shared.CurrentStep[pn]; pss:SetCurMaxScore(pss:GetCurMaxScore() + (stepLast * judgmentBase['TapNoteScore_W1'])); local judgeScore = 0; @@ -107,9 +110,9 @@ r['DDR Extreme'] = function(params, pss) end; local stepScore = judgeScore * stepLast; pss:SetScore(pss:GetScore() + stepScore); - if (Shared.CurrentStep >= totalItems) then -- Just in case. + if (Shared.CurrentStep[pn] >= totalItems) then -- Just in case. -- TODO: Implement the bonus for the last step? - Shared.CurrentStep = 0; -- Reset for the next song. + Shared.CurrentStep[pn] = 0; -- Reset for the next song. end; end; ----------------------------------------------------------- From 0fc49d9da996d59cefe5557abd146ac7a34d2e7d Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sat, 14 May 2011 19:27:25 -0500 Subject: [PATCH 05/17] [MusicWheel] Added ShowSectionsInBPMSort and ShowSectionsInLengthSort metrics. --- Docs/Changelog_sm5.txt | 4 ++++ Themes/_fallback/metrics.ini | 2 ++ src/SongUtil.cpp | 34 +++++++++++++++++++++++----------- 3 files changed, 29 insertions(+), 11 deletions(-) diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index cba431e5b8..0ad0e45592 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -8,6 +8,10 @@ ________________________________________________________________________________ StepMania 5.0 $NEXT | 20110xyy -------------------------------------------------------------------------------- +2011/05/14 +---------- +* [MusicWheel] Added ShowSectionsInBPMSort and ShowSectionsInLengthSort metrics. [AJ] + 2011/05/11 ---------- * [GameSoundManager] Added PlayAnnouncer Lua binding. [AJ] diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index 668d96827b..cd36f351cc 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -857,7 +857,9 @@ ShowRoulette=true ShowRandom=false ShowPortal=false +ShowSectionsInBPMSort=true SortBPMDivision=20 +ShowSectionsInLengthSort=true SortLengthDivision=5 MostPlayedSongsToShow=30 diff --git a/src/SongUtil.cpp b/src/SongUtil.cpp index 2641f860f0..3d83420167 100644 --- a/src/SongUtil.cpp +++ b/src/SongUtil.cpp @@ -21,6 +21,8 @@ ThemeMetric SORT_BPM_DIVISION ( "MusicWheel", "SortBPMDivision" ); ThemeMetric SORT_LENGTH_DIVISION ( "MusicWheel", "SortLengthDivision" ); +ThemeMetric SHOW_SECTIONS_IN_BPM_SORT ( "MusicWheel", "ShowSectionsInBPMSort" ); +ThemeMetric SHOW_SECTIONS_IN_LENGTH_SORT ( "MusicWheel", "ShowSectionsInLengthSort" ); bool SongCriteria::Matches( const Song *pSong ) const { @@ -598,20 +600,30 @@ RString SongUtil::GetSectionNameFromSongAndSort( const Song* pSong, SortOrder so return SORT_NOT_AVAILABLE.GetValue(); case SORT_BPM: { - const int iBPMGroupSize = SORT_BPM_DIVISION; - DisplayBpms bpms; - pSong->GetDisplayBpms( bpms ); - int iMaxBPM = (int)bpms.GetMax(); - iMaxBPM += iBPMGroupSize - (iMaxBPM%iBPMGroupSize) - 1; - return ssprintf("%03d-%03d",iMaxBPM-(iBPMGroupSize-1), iMaxBPM); + if( SHOW_SECTIONS_IN_BPM_SORT ) + { + const int iBPMGroupSize = SORT_BPM_DIVISION; + DisplayBpms bpms; + pSong->GetDisplayBpms( bpms ); + int iMaxBPM = (int)bpms.GetMax(); + iMaxBPM += iBPMGroupSize - (iMaxBPM%iBPMGroupSize) - 1; + return ssprintf("%03d-%03d",iMaxBPM-(iBPMGroupSize-1), iMaxBPM); + } + else + return RString(); } case SORT_LENGTH: { - const int iSortLengthSize = SORT_LENGTH_DIVISION; - int iMaxLength = (int)pSong->m_fMusicLengthSeconds; - iMaxLength += (iSortLengthSize - (iMaxLength%iSortLengthSize) - 1); - int iMinLength = iMaxLength - (iSortLengthSize-1); - return ssprintf( "%s-%s", SecondsToMMSS(iMinLength).c_str(), SecondsToMMSS(iMaxLength).c_str() ); + if( SHOW_SECTIONS_IN_LENGTH_SORT ) + { + const int iSortLengthSize = SORT_LENGTH_DIVISION; + int iMaxLength = (int)pSong->m_fMusicLengthSeconds; + iMaxLength += (iSortLengthSize - (iMaxLength%iSortLengthSize) - 1); + int iMinLength = iMaxLength - (iSortLengthSize-1); + return ssprintf( "%s-%s", SecondsToMMSS(iMinLength).c_str(), SecondsToMMSS(iMaxLength).c_str() ); + } + else + return RString(); } case SORT_POPULARITY: case SORT_RECENT: From aec111214444ecd720b048e9a7ccdd4a3ef10c64 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sat, 14 May 2011 19:36:50 -0500 Subject: [PATCH 06/17] [ScreenEvaluation] Stop the Bonus bars from overflowing in course modes. --- Docs/Changelog_sm5.txt | 1 + src/ScreenEvaluation.cpp | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index 0ad0e45592..94335c16d0 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -11,6 +11,7 @@ StepMania 5.0 $NEXT | 20110xyy 2011/05/14 ---------- * [MusicWheel] Added ShowSectionsInBPMSort and ShowSectionsInLengthSort metrics. [AJ] +* [ScreenEvaluation] Stop the Bonus bars from overflowing in course modes. [AJ] 2011/05/11 ---------- diff --git a/src/ScreenEvaluation.cpp b/src/ScreenEvaluation.cpp index 76c40f03a1..de756c34fc 100644 --- a/src/ScreenEvaluation.cpp +++ b/src/ScreenEvaluation.cpp @@ -370,6 +370,11 @@ void ScreenEvaluation::Init() // init bonus area if( SHOW_BONUS_AREA ) { + // In course mode, we need to make sure the bar doesn't overflow. -aj + float fDivider = 1.0f; + if( GAMESTATE->IsCourseMode() ) + fDivider = fDivider / GAMESTATE->m_pCurCourse->m_vEntries.size(); + FOREACH_EnabledPlayer( p ) { m_sprBonusFrame[p].Load( THEME->GetPathG(m_sName,ssprintf("BonusFrame p%d",p+1)) ); @@ -382,7 +387,7 @@ void ScreenEvaluation::Init() for( int r=0; rGetPathG(m_sName,ssprintf("BarPossible p%d",p+1)) ); - m_sprPossibleBar[p][r].SetWidth( m_sprPossibleBar[p][r].GetUnzoomedWidth() * m_pStageStats->m_player[p].m_radarPossible[r] ); + m_sprPossibleBar[p][r].SetWidth( m_sprPossibleBar[p][r].GetUnzoomedWidth() * m_pStageStats->m_player[p].m_radarPossible[r] * fDivider ); m_sprPossibleBar[p][r].SetName( ssprintf("BarPossible%dP%d",r+1,p+1) ); ActorUtil::LoadAllCommands( m_sprPossibleBar[p][r], m_sName ); SET_XY( m_sprPossibleBar[p][r] ); @@ -390,7 +395,7 @@ void ScreenEvaluation::Init() m_sprActualBar[p][r].Load( THEME->GetPathG(m_sName,ssprintf("BarActual p%d",p+1)) ); // should be out of the possible bar, not actual (whatever value that is at) - m_sprActualBar[p][r].SetWidth( m_sprPossibleBar[p][r].GetUnzoomedWidth() * m_pStageStats->m_player[p].m_radarActual[r] ); + m_sprActualBar[p][r].SetWidth( m_sprPossibleBar[p][r].GetUnzoomedWidth() * m_pStageStats->m_player[p].m_radarActual[r] * fDivider ); float value = (float)100 * m_sprActualBar[p][r].GetUnzoomedWidth() / m_sprPossibleBar[p][r].GetUnzoomedWidth(); LOG->Trace("Radar bar %d of 5 - %f percent", r, value); From b5129ac163f19d74947a51974bae104dcdc0ff26 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sat, 14 May 2011 19:53:57 -0500 Subject: [PATCH 07/17] [Banner] Added ScrollMode and ScrollSortOrder metrics. --- Docs/Changelog_sm5.txt | 1 + Themes/_fallback/metrics.ini | 2 ++ src/Banner.cpp | 8 ++++---- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index 94335c16d0..605c20658e 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -12,6 +12,7 @@ StepMania 5.0 $NEXT | 20110xyy ---------- * [MusicWheel] Added ShowSectionsInBPMSort and ShowSectionsInLengthSort metrics. [AJ] * [ScreenEvaluation] Stop the Bonus bars from overflowing in course modes. [AJ] +* [Banner] Added ScrollMode and ScrollSortOrder metrics. [AJ] 2011/05/11 ---------- diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index cd36f351cc..f804a18e50 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -220,6 +220,8 @@ BottomEdge=SCREEN_BOTTOM # Scroll stuff when you roll over it, DDR Extreme style. ScrollRandom=false ScrollRoulette=false +ScrollMode=false +ScrollScrollOrder=false # Control how fast the banner scrolls. Higher numbers mean slower. ScrollSpeedDivisor=2 diff --git a/src/Banner.cpp b/src/Banner.cpp index b8d115e206..f78777d73d 100644 --- a/src/Banner.cpp +++ b/src/Banner.cpp @@ -17,8 +17,8 @@ REGISTER_ACTOR_CLASS( Banner ); ThemeMetric SCROLL_RANDOM ("Banner","ScrollRandom"); ThemeMetric SCROLL_ROULETTE ("Banner","ScrollRoulette"); -//ThemeMetric SCROLL_MODE ("Banner","ScrollMode"); -//ThemeMetric SCROLL_SORT_ORDER ("Banner","ScrollSortOrder"); +ThemeMetric SCROLL_MODE ("Banner","ScrollMode"); +ThemeMetric SCROLL_SORT_ORDER ("Banner","ScrollSortOrder"); ThemeMetric SCROLL_SPEED_DIVISOR ("Banner","ScrollSpeedDivisor"); Banner::Banner() @@ -119,7 +119,7 @@ void Banner::LoadFromSong( Song* pSong ) // NULL means no song void Banner::LoadMode() { Load( THEME->GetPathG("Banner","Mode") ); - m_bScrolling = false; + m_bScrolling = (bool)SCROLL_MODE; } void Banner::LoadFromSongGroup( RString sSongGroup ) @@ -229,7 +229,7 @@ void Banner::LoadFromSortOrder( SortOrder so ) if( so != SORT_GROUP && so != SORT_RECENT ) Load( THEME->GetPathG("Banner",ssprintf("%s",SortOrderToString(so).c_str())) ); } - m_bScrolling = false; + m_bScrolling = (bool)SCROLL_SORT_ORDER; } // lua start From 78681a52ff1d169e45dabd7b7aa1c5087e682d90 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sat, 14 May 2011 20:30:44 -0500 Subject: [PATCH 08/17] fix typo --- Themes/_fallback/metrics.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index f804a18e50..280fb4d344 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -221,7 +221,7 @@ BottomEdge=SCREEN_BOTTOM ScrollRandom=false ScrollRoulette=false ScrollMode=false -ScrollScrollOrder=false +ScrollSortOrder=false # Control how fast the banner scrolls. Higher numbers mean slower. ScrollSpeedDivisor=2 From 62964d08ffceebc863ada6c9ce05130f8d91a931 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sat, 14 May 2011 22:06:14 -0500 Subject: [PATCH 09/17] make these two asserts more helpful --- src/ScoreKeeperNormal.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ScoreKeeperNormal.cpp b/src/ScoreKeeperNormal.cpp index b3e106bfaf..3a024ec348 100644 --- a/src/ScoreKeeperNormal.cpp +++ b/src/ScoreKeeperNormal.cpp @@ -360,14 +360,14 @@ void ScoreKeeperNormal::AddScoreInternal( TapNoteScore score ) } - ASSERT( iScore >= 0 ); + ASSERT_M( iScore >= 0, "iScore < 0 before re-rounding" ); // Undo rounding from the last tap, and re-round. iScore += m_iScoreRemainder; m_iScoreRemainder = (iScore % m_iRoundTo); iScore = iScore - m_iScoreRemainder; - ASSERT( iScore >= 0 ); + ASSERT_M( iScore >= 0, "iScore < 0 after re-rounding" ); // LOG->Trace( "score: %i", iScore ); } From e4a446482441cb78fb8c9331e849f152830cb6ba Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sat, 14 May 2011 22:18:14 -0500 Subject: [PATCH 10/17] [StepsDisplay] Added MeterFormatString metric. --- Docs/Changelog_sm5.txt | 1 + Themes/_fallback/metrics.ini | 2 ++ src/StepsDisplay.cpp | 4 ++-- src/StepsDisplay.h | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index 605c20658e..f0e3a0f295 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -10,6 +10,7 @@ StepMania 5.0 $NEXT | 20110xyy 2011/05/14 ---------- +* [StepsDisplay] Added MeterFormatString metric. [AJ] * [MusicWheel] Added ShowSectionsInBPMSort and ShowSectionsInLengthSort metrics. [AJ] * [ScreenEvaluation] Stop the Bonus bars from overflowing in course modes. [AJ] * [Banner] Added ScrollMode and ScrollSortOrder metrics. [AJ] diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index 280fb4d344..298794735b 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -1286,6 +1286,7 @@ TicksSetCommand= # ShowMeter=false ZeroMeterString="0" +MeterFormatString="%i" MeterX=0 MeterY=0 MeterOnCommand= @@ -2009,6 +2010,7 @@ TicksOnCommand=shadowlength,0; TicksSetCommand=%function(self,param) self:diffuse(CustomDifficultyToColor(param.CustomDifficulty)) if param.Meter > 9 then self:glowshift() else self:stopeffect() end end ShowTicks=false ShowMeter=true +MeterFormatString="%i" ZeroMeterString="?" MeterX=30 MeterY=0 diff --git a/src/StepsDisplay.cpp b/src/StepsDisplay.cpp index a42fb31831..7df5e6b930 100644 --- a/src/StepsDisplay.cpp +++ b/src/StepsDisplay.cpp @@ -59,6 +59,7 @@ void StepsDisplay::Load( const RString &sMetricsGroup, const PlayerState *pPlaye m_bShowAutogen.Load(m_sMetricsGroup,"ShowAutogen"); m_bShowStepsType.Load(m_sMetricsGroup,"ShowStepsType"); m_sZeroMeterString.Load(m_sMetricsGroup,"ZeroMeterString"); + m_sMeterFormatString.Load(m_sMetricsGroup,"MeterFormatString"); m_sprFrame.Load( THEME->GetPathG(m_sMetricsGroup,"frame") ); m_sprFrame->SetName( "Frame" ); @@ -241,8 +242,7 @@ void StepsDisplay::SetInternal( const SetParams ¶ms ) } else { - // todo: allow themer to specify a format string? -aj - const RString sMeter = ssprintf( "%i", params.iMeter ); + const RString sMeter = ssprintf( m_sMeterFormatString.GetValue().c_str(), params.iMeter ); m_textMeter.SetText( sMeter ); m_textMeter.HandleMessage( msg ); } diff --git a/src/StepsDisplay.h b/src/StepsDisplay.h index ee266aace6..c3af3063a9 100644 --- a/src/StepsDisplay.h +++ b/src/StepsDisplay.h @@ -72,6 +72,7 @@ private: ThemeMetric m_bShowAutogen; ThemeMetric m_bShowStepsType; ThemeMetric m_sZeroMeterString; + ThemeMetric m_sMeterFormatString; }; #endif From d006795311d52fe4622fe7a5c101648b9ebdd909 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sat, 14 May 2011 22:27:46 -0500 Subject: [PATCH 11/17] hopeful autoplay score saving fix --- src/StageStats.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/StageStats.cpp b/src/StageStats.cpp index df3a500349..d30e7bfe9f 100644 --- a/src/StageStats.cpp +++ b/src/StageStats.cpp @@ -202,7 +202,6 @@ void StageStats::FinalizeScores( bool bSummary ) m_multiPlayer[mp].m_HighScore = FillInHighScore( m_multiPlayer[mp], *GAMESTATE->m_pMultiPlayerState[mp], "", sPlayerGuid ); } - // todo: don't save scores in autoplay -aj FOREACH_HumanPlayer( p ) { const HighScore &hs = m_player[p].m_HighScore; @@ -215,6 +214,10 @@ void StageStats::FinalizeScores( bool bSummary ) if( hs.GetDisqualified() ) continue; + // Don't save autoplay scores + if( m_bUsedAutoplay ) + continue; + if( bSummary ) { // don't save scores if any stage was failed From dc143c58e6bda9a8b2dd4e18ef98cbe9ac8d30e0 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sat, 14 May 2011 22:30:32 -0500 Subject: [PATCH 12/17] remove out of date comment, overlay/underlay aren't going anywhere as they're needed to abuse custom menus --- src/ScreenWithMenuElements.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/ScreenWithMenuElements.cpp b/src/ScreenWithMenuElements.cpp index df4f78ca95..8377a5fb75 100644 --- a/src/ScreenWithMenuElements.cpp +++ b/src/ScreenWithMenuElements.cpp @@ -64,10 +64,6 @@ void ScreenWithMenuElements::Init() this->AddChild( m_MenuTimer ); } - /* TODO: Remove overlay and underlay in favor of more flexible decorations */ - // Decorations don't let you use UpdateCommand, so don't ever - // remove underlay and overlay, otherwise good themes break. -aj - m_sprUnderlay.Load( THEME->GetPathB(m_sName,"underlay") ); m_sprUnderlay->SetName("Underlay"); m_sprUnderlay->SetDrawOrder( DRAW_ORDER_UNDERLAY ); From afaa711038b5370c3c28f7019d2e7526baf1da90 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sat, 14 May 2011 22:41:32 -0500 Subject: [PATCH 13/17] [ScreenSelectMaster] Add "ScreenEmpty" param to MenuStartP# when the GameCommand doesn't set a screen. --- Docs/Changelog_sm5.txt | 2 ++ src/ScreenSelectMaster.cpp | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index f0e3a0f295..9ad6035da8 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -10,6 +10,8 @@ StepMania 5.0 $NEXT | 20110xyy 2011/05/14 ---------- +* [ScreenSelectMaster] Add "ScreenEmpty" param to MenuStartP# when the GameCommand + doesn't set a screen. [AJ] * [StepsDisplay] Added MeterFormatString metric. [AJ] * [MusicWheel] Added ShowSectionsInBPMSort and ShowSectionsInLengthSort metrics. [AJ] * [ScreenEvaluation] Stop the Bonus bars from overflowing in course modes. [AJ] diff --git a/src/ScreenSelectMaster.cpp b/src/ScreenSelectMaster.cpp index 83276d4e33..0e50f5ccbf 100644 --- a/src/ScreenSelectMaster.cpp +++ b/src/ScreenSelectMaster.cpp @@ -812,8 +812,9 @@ void ScreenSelectMaster::MenuStart( const InputEventPlus &input ) mc.ApplyToAllPlayers(); // We want to be able to broadcast a Start message to the theme, in // case a themer wants to handle something. -aj - // TODO: Add a param to differentiate this from the message below. - MESSAGEMAN->Broadcast( (MessageID)(Message_MenuStartP1+pn) ); + Message msg( MessageIDToString((MessageID)(Message_MenuStartP1+pn)) ); + msg.SetParam( "ScreenEmpty", true ); + MESSAGEMAN->Broadcast( msg ); return; } From f1bc24160ba01176c2346b8183238afb2d01905d Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sat, 14 May 2011 22:41:57 -0500 Subject: [PATCH 14/17] remove old note, reorganize dead code slightly --- src/ScreenSelectMusic.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ScreenSelectMusic.cpp b/src/ScreenSelectMusic.cpp index fe4aee3aab..eb3acff4d9 100644 --- a/src/ScreenSelectMusic.cpp +++ b/src/ScreenSelectMusic.cpp @@ -1455,7 +1455,9 @@ void ScreenSelectMusic::MenuBack( const InputEventPlus &input ) // Handle unselect song (ffff) // todo: this isn't right at all. -aj /* - if( m_SelectionState == SelectionState_SelectingSteps && !m_bStepsChosen[input.pn] && input.MenuI == GAME_BUTTON_BACK && input.type == IET_FIRST_PRESS ) + if( m_SelectionState == SelectionState_SelectingSteps && + !m_bStepsChosen[input.pn] && input.MenuI == GAME_BUTTON_BACK && + input.type == IET_FIRST_PRESS ) { // if a player has chosen their steps already, don't unchoose song. FOREACH_HumanPlayer( p ) @@ -1530,7 +1532,6 @@ void ScreenSelectMusic::AfterStepsOrTrailChange( const vector &vpn else { // The numbers shouldn't stay if the current selection is NULL. - // todo: Let themers set the text value instead of just using 0. -aj m_textHighScore[pn].SetText( NULL_SCORE_STRING ); } } From 87148206a7bbd17c6056ea9b333da6b836b6d2cc Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sat, 14 May 2011 22:58:42 -0500 Subject: [PATCH 15/17] [ModIcon] Added StopWords metric. --- Docs/Changelog_sm5.txt | 1 + Themes/_fallback/metrics.ini | 1 + src/ModIcon.cpp | 9 +++++---- src/ModIcon.h | 2 ++ 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index 9ad6035da8..daf91cd16f 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -10,6 +10,7 @@ StepMania 5.0 $NEXT | 20110xyy 2011/05/14 ---------- +* [ModIcon] Added StopWords metric. [AJ] * [ScreenSelectMaster] Add "ScreenEmpty" param to MenuStartP# when the GameCommand doesn't set a screen. [AJ] * [StepsDisplay] Added MeterFormatString metric. [AJ] diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index 298794735b..1b23a2200c 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -4036,6 +4036,7 @@ TextX=0 TextY=0 TextOnCommand=maxwidth,40;uppercase,true;shadowlength,0;diffuse,color("#f6ff00") CropTextToWidth=50 +StopWords="1X,default,Overhead,Off" [ModIconSelectMusic] Fallback="ModIcon" diff --git a/src/ModIcon.cpp b/src/ModIcon.cpp index 0ef95daeb4..9dcf9dd929 100644 --- a/src/ModIcon.cpp +++ b/src/ModIcon.cpp @@ -40,11 +40,9 @@ void ModIcon::Load( RString sMetricsGroup ) CROP_TEXT_TO_WIDTH.Load( sMetricsGroup, "CropTextToWidth" ); // stop words - /* STOP_WORDS.Load( sMetricsGroup, "StopWords" ); m_vStopWords.empty(); split(STOP_WORDS, ",", m_vStopWords); - */ Set(""); } @@ -54,6 +52,7 @@ void ModIcon::Set( const RString &_sText ) RString sText = _sText; // todo: make these metricable -aj + /* static const RString sStopWords[] = { "1X", @@ -61,9 +60,11 @@ void ModIcon::Set( const RString &_sText ) "OVERHEAD", "OFF", }; + */ - for( unsigned i=0; i CROP_TEXT_TO_WIDTH; + ThemeMetric STOP_WORDS; + vector m_vStopWords; }; #endif From 250bd08f99efd93276cd9442037fdc497e88efd9 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sat, 14 May 2011 22:59:16 -0500 Subject: [PATCH 16/17] pedantic changes --- src/ModIcon.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/ModIcon.cpp b/src/ModIcon.cpp index 9dcf9dd929..6d359046e7 100644 --- a/src/ModIcon.cpp +++ b/src/ModIcon.cpp @@ -39,6 +39,7 @@ void ModIcon::Load( RString sMetricsGroup ) this->AddChild( &m_text ); CROP_TEXT_TO_WIDTH.Load( sMetricsGroup, "CropTextToWidth" ); + // stop words STOP_WORDS.Load( sMetricsGroup, "StopWords" ); m_vStopWords.empty(); @@ -51,18 +52,6 @@ void ModIcon::Set( const RString &_sText ) { RString sText = _sText; - // todo: make these metricable -aj - /* - static const RString sStopWords[] = - { - "1X", - "DEFAULT", - "OVERHEAD", - "OFF", - }; - */ - - //for( unsigned i=0; i Date: Sat, 14 May 2011 23:36:42 -0500 Subject: [PATCH 17/17] handle WM_MOUSEWHEEL message in GraphicsWindow_WndProc --- src/archutils/Win32/GraphicsWindow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/archutils/Win32/GraphicsWindow.cpp b/src/archutils/Win32/GraphicsWindow.cpp index 814afa882a..cb2b128d71 100644 --- a/src/archutils/Win32/GraphicsWindow.cpp +++ b/src/archutils/Win32/GraphicsWindow.cpp @@ -136,6 +136,7 @@ static LRESULT CALLBACK GraphicsWindow_WndProc( HWND hWnd, UINT msg, WPARAM wPar case WM_KEYUP: case WM_SYSKEYDOWN: case WM_SYSKEYUP: + case WM_MOUSEWHEEL: // We handle all input ourself, via DirectInput. return 0;