From b02a4ae096c308ddd178a9af60f037d2303bd747 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Wed, 16 May 2012 01:31:00 -0500 Subject: [PATCH 1/4] [ScreenWithMenuElements] Add DelayMusicSeconds metric. requested in issue 540: http://ssc.ajworld.net/sm-ssc/bugtracker/view.php?id=540 --- Docs/Changelog_sm5.txt | 4 ++++ Themes/_fallback/metrics.ini | 1 + src/ScreenWithMenuElements.cpp | 9 +++++++++ src/ScreenWithMenuElements.h | 1 + 4 files changed, 15 insertions(+) diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index fad6cbd8e3..7c23e67d14 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -4,6 +4,10 @@ The StepMania 5 Changelog covers all post-sm-ssc changes. For a list of changes from StepMania 4 alpha 5 to sm-ssc v1.2.5, see Changelog_sm-ssc.txt. ________________________________________________________________________________ +2012/05/16 +---------- +* [ScreenWithMenuElements] Added DelayMusicSeconds metric. + 2012/05/14 ---------- * [Course] Added AllSongsAreFixed() Lua binding. diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index d59611d896..631d525f25 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -1578,6 +1578,7 @@ TimerSeconds=-1 FirstUpdateCommand= PlayMusic=true MusicAlignBeat=true +DelayMusicSeconds=0 StopMusicOnBack=false WaitForChildrenBeforeTweeningOut=false CancelTransitionsOut=false diff --git a/src/ScreenWithMenuElements.cpp b/src/ScreenWithMenuElements.cpp index 8377a5fb75..0db311fd6d 100644 --- a/src/ScreenWithMenuElements.cpp +++ b/src/ScreenWithMenuElements.cpp @@ -31,6 +31,7 @@ void ScreenWithMenuElements::Init() { PLAY_MUSIC.Load( m_sName, "PlayMusic" ); MUSIC_ALIGN_BEAT.Load( m_sName, "MusicAlignBeat" ); + DELAY_MUSIC_SECONDS.Load( m_sName, "DelayMusicSeconds" ); CANCEL_TRANSITIONS_OUT.Load( m_sName, "CancelTransitionsOut" ); TIMER_SECONDS.Load( m_sName, "TimerSeconds" ); TIMER_METRICS_GROUP.Load( m_sName, "TimerMetricsGroup" ); @@ -217,7 +218,11 @@ void ScreenWithMenuElements::StartPlayingMusic() { pmp.sFile = sMusicPathFromLua; pmp.bAlignBeat = MUSIC_ALIGN_BEAT; + // TODO: load other params into pmp here -aj + if( DELAY_MUSIC_SECONDS > 0.0f ) + pmp.fStartSecond = -DELAY_MUSIC_SECONDS; + SOUND->PlayMusic( pmp ); } else @@ -238,6 +243,10 @@ void ScreenWithMenuElements::StartPlayingMusic() { pmp.sFile = m_sPathToMusic; pmp.bAlignBeat = MUSIC_ALIGN_BEAT; + + if( DELAY_MUSIC_SECONDS > 0.0f ) + pmp.fStartSecond = -DELAY_MUSIC_SECONDS; + SOUND->PlayMusic( pmp ); } } diff --git a/src/ScreenWithMenuElements.h b/src/ScreenWithMenuElements.h index 6027387120..a671e9cfd9 100644 --- a/src/ScreenWithMenuElements.h +++ b/src/ScreenWithMenuElements.h @@ -49,6 +49,7 @@ protected: ThemeMetric PLAY_MUSIC; ThemeMetric MUSIC_ALIGN_BEAT; + ThemeMetric DELAY_MUSIC_SECONDS; ThemeMetric CANCEL_TRANSITIONS_OUT; ThemeMetric TIMER_SECONDS; ThemeMetric TIMER_METRICS_GROUP; From 9d3b2f10dd548c92c05c5a1dda893b0061c0067e Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Wed, 16 May 2012 13:13:58 -0500 Subject: [PATCH 2/4] fix eval showing one stage later than expected --- .../ScreenWithMenuElements StageDisplay.lua | 47 +++++++++++-------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/Themes/default/Graphics/ScreenWithMenuElements StageDisplay.lua b/Themes/default/Graphics/ScreenWithMenuElements StageDisplay.lua index 5394ab5d25..e0baff0761 100644 --- a/Themes/default/Graphics/ScreenWithMenuElements StageDisplay.lua +++ b/Themes/default/Graphics/ScreenWithMenuElements StageDisplay.lua @@ -6,25 +6,34 @@ local t = Def.ActorFrame {}; t[#t+1] = Def.ActorFrame { LoadActor(THEME:GetPathB("_frame","3x3"),"rounded black",64,12); LoadFont("Common Normal") .. { - InitCommand=cmd(y,-1;shadowlength,1;playcommand,"Set"); - SetCommand=function(self) - if GAMESTATE:GetCurrentCourse() then - self:settext( GAMESTATE:GetCurrentStageIndex()+1 .. " / " .. GAMESTATE:GetCurrentCourse():GetEstimatedNumStages() ); - elseif GAMESTATE:IsEventMode() then - self:settextf("Stage %s", curStageIndex+1); - else - if THEME:GetMetric(curScreen,"StageDisplayUseShortString") then - self:settextf("%s", ToEnumShortString(curStage)); - self:zoom(0.75); - else - self:settextf("%s Stage", ToEnumShortString(curStage)); - self:zoom(1); - end; - end; - -- StepMania is being stupid so we have to do this here; - self:diffuse(StageToColor(curStage)); - self:diffusetopedge(ColorLightTone(StageToColor(curStage))); - end; + InitCommand=cmd(y,-1;shadowlength,1;); + BeginCommand=function(self) + local top = SCREENMAN:GetTopScreen() + if top then + if not string.find(top:GetName(),"ScreenEvaluation") then + curStageIndex = curStageIndex + 1 + end + end + self:playcommand("Set") + end; + SetCommand=function(self) + if GAMESTATE:GetCurrentCourse() then + self:settext( curStageIndex+1 .. " / " .. GAMESTATE:GetCurrentCourse():GetEstimatedNumStages() ); + elseif GAMESTATE:IsEventMode() then + self:settextf("Stage %s", curStageIndex); + else + if THEME:GetMetric(curScreen,"StageDisplayUseShortString") then + self:settextf("%s", ToEnumShortString(curStage)); + self:zoom(0.75); + else + self:settextf("%s Stage", ToEnumShortString(curStage)); + self:zoom(1); + end; + end; + -- StepMania is being stupid so we have to do this here; + self:diffuse(StageToColor(curStage)); + self:diffusetopedge(ColorLightTone(StageToColor(curStage))); + end; }; }; return t \ No newline at end of file From a476e34619f66b3439f592c7b342498eb5b8c57f Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Wed, 16 May 2012 13:14:13 -0500 Subject: [PATCH 3/4] [ScreenOptionsMasterPrefs] Allow for FastLoadAdditionalSongs preference to be called via the "conf" command. --- Docs/Changelog_sm5.txt | 6 ++++-- Themes/_fallback/Languages/en.ini | 2 ++ Themes/_fallback/metrics.ini | 3 ++- src/ScreenOptionsMasterPrefs.cpp | 1 + 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index 7c23e67d14..295f47fd0e 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -6,11 +6,13 @@ ________________________________________________________________________________ 2012/05/16 ---------- -* [ScreenWithMenuElements] Added DelayMusicSeconds metric. +* [ScreenWithMenuElements] Added DelayMusicSeconds metric. [AJ] +* [ScreenOptionsMasterPrefs] Allow for FastLoadAdditionalSongs preference + to be called via the "conf" command. [AJ] 2012/05/14 ---------- -* [Course] Added AllSongsAreFixed() Lua binding. +* [Course] Added AllSongsAreFixed() Lua binding. [AJ] ================================================================================ StepMania 5.0 alpha 2 | 20120504 diff --git a/Themes/_fallback/Languages/en.ini b/Themes/_fallback/Languages/en.ini index 9677f6624d..2489e45e35 100644 --- a/Themes/_fallback/Languages/en.ini +++ b/Themes/_fallback/Languages/en.ini @@ -378,6 +378,7 @@ EventMode=When set to &oq;ON&cq;, and you can continue playing forever. Failing Exit= Fail=Fail FastLoad=If enabled, don't check songs for changes on load. +FastLoadAdditionalSongs=If enabled, don't check songs for changes to Additional Songs on load. Fill Machine Stats= Game=Change the current game type with this option. GetRankingName=Determines if name entry should never be shown, always be shown, or shown when the course is listed on the high scores screen. @@ -916,6 +917,7 @@ Exit=Exit Fail=Fail Fakes=Fakes FastLoad=Fast\nLoad +FastLoadAdditionalSongs=Fast Load\nAdditional Songs File1 Global BGAnimation=File1 Global BGAnimation File1 Global Movie=File1 Global Movie File1 Global Movie (Group + Genre)=File1 Global Movie (Group + Genre) diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index 631d525f25..e445c49c40 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -2888,7 +2888,7 @@ Line20="conf,VisualDelaySeconds" Fallback="ScreenOptionsServiceChild" NextScreen="ScreenOptionsService" PrevScreen="ScreenOptionsService" -LineNames="Score,3,4,8,11,13,14,15,16,28,29,30" +LineNames="Score,3,4,8,11,13,14,15,16,28,29,30,31" LineScore="lua,UserPrefScoringMode()" Line3="conf,TimingWindowScale" Line4="conf,LifeDifficulty" @@ -2901,6 +2901,7 @@ Line16="conf,UseUnlockSystem" Line28="conf,AutogenSteps" Line29="conf,AutogenGroupCourses" Line30="conf,FastLoad" +Line31="conf,FastLoadAdditionalSongs" # unused options #Line2="conf,ScoringType" diff --git a/src/ScreenOptionsMasterPrefs.cpp b/src/ScreenOptionsMasterPrefs.cpp index a3fd2305c8..6993cefeb6 100644 --- a/src/ScreenOptionsMasterPrefs.cpp +++ b/src/ScreenOptionsMasterPrefs.cpp @@ -678,6 +678,7 @@ static void InitializeConfOptions() ADD( ConfOption( "AutogenGroupCourses", MovePref, "Off","On" ) ); ADD( ConfOption( "FastLoad", MovePref, "Off","On" ) ); + ADD( ConfOption( "FastLoadAdditionalSongs", MovePref, "Off","On" ) ); // Background options ADD( ConfOption( "RandomBackgroundMode", MovePref, "Off","Animations","Random Movies" ) ); From ea0a85406569bc284da4e830f4206b0e8764006c Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Thu, 17 May 2012 12:08:05 -0500 Subject: [PATCH 4/4] [LoadingWindow_Gtk] Actually resolve the path to the Splash file. [djpohly] --- Docs/Changelog_sm5.txt | 4 ++++ Docs/credits.txt | 3 +++ src/arch/LoadingWindow/LoadingWindow_Gtk.cpp | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index 295f47fd0e..c3e1f6ea13 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -4,6 +4,10 @@ The StepMania 5 Changelog covers all post-sm-ssc changes. For a list of changes from StepMania 4 alpha 5 to sm-ssc v1.2.5, see Changelog_sm-ssc.txt. ________________________________________________________________________________ +2012/05/17 +---------- +* [LoadingWindow_Gtk] Actually resolve the path to the Splash file. [djpohly] + 2012/05/16 ---------- * [ScreenWithMenuElements] Added DelayMusicSeconds metric. [AJ] diff --git a/Docs/credits.txt b/Docs/credits.txt index e56c656a5b..d83939c271 100644 --- a/Docs/credits.txt +++ b/Docs/credits.txt @@ -141,6 +141,9 @@ Deamon007 cvpcs * Updated ffmpeg support to v0.10 +djpohly + * Various patches/fixes + ==the beta testers== [SSC Beta Testing Team] KeithD diff --git a/src/arch/LoadingWindow/LoadingWindow_Gtk.cpp b/src/arch/LoadingWindow/LoadingWindow_Gtk.cpp index 0fbb07199c..7e1d3187d9 100644 --- a/src/arch/LoadingWindow/LoadingWindow_Gtk.cpp +++ b/src/arch/LoadingWindow/LoadingWindow_Gtk.cpp @@ -92,7 +92,7 @@ void LoadingWindow_Gtk::SetIcon( const RageSurface *pIcon ) void LoadingWindow_Gtk::SetSplash( const RString str ) { - Module_SetSplash( str ); + Module_SetSplash( FILEMAN->ResolvePath(str) ); } void LoadingWindow_Gtk::SetProgress( const int progress )