From d7fa896646f996fb562a6389e827dcc8e9327d22 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Thu, 3 Mar 2011 00:08:40 -0600 Subject: [PATCH 1/6] CustomLighting is another command I'm having some trouble with... --- src/ActorFrame.cpp | 5 ++++- src/ActorFrame.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ActorFrame.cpp b/src/ActorFrame.cpp index bbe12260a5..32887346ed 100644 --- a/src/ActorFrame.cpp +++ b/src/ActorFrame.cpp @@ -528,9 +528,10 @@ public: } static int SortByDrawOrder( T* p, lua_State *L ) { p->SortByDrawOrder(); return 0; } + //static int CustomLighting( T* p, lua_State *L ) { p->SetCustomLighting(BArg(1)); return 0; } static int SetAmbientLightColor( T* p, lua_State *L ) { RageColor c; c.FromStackCompat( L, 1 ); p->SetAmbientLightColor( c ); return 0; } static int SetDiffuseLightColor( T* p, lua_State *L ) { RageColor c; c.FromStackCompat( L, 1 ); p->SetDiffuseLightColor( c ); return 0; } - static int SetSpecularLightColor( T* p, lua_State *L ) { RageColor c; c.FromStackCompat( L, 1 ); p->SetSpecularLightColor( c ); return 0; } + static int SetSpecularLightColor( T* p, lua_State *L ) { RageColor c; c.FromStackCompat( L, 1 ); p->SetSpecularLightColor( c ); return 0; } static int SetLightDirection( T* p, lua_State *L ) { luaL_checktype( L, 1, LUA_TTABLE ); @@ -546,6 +547,7 @@ public: p->SetLightDirection( vTmp ); return 0; } + // xxx: these might not be good ideas... -aj /* static int AddChild( T* p, lua_State *L ) @@ -585,6 +587,7 @@ public: ADD_METHOD( GetDrawFunction ); ADD_METHOD( SetUpdateFunction ); ADD_METHOD( SortByDrawOrder ); + //ADD_METHOD( CustomLighting ); ADD_METHOD( SetAmbientLightColor ); ADD_METHOD( SetDiffuseLightColor ); ADD_METHOD( SetSpecularLightColor ); diff --git a/src/ActorFrame.h b/src/ActorFrame.h index e5473ea1c8..3aeaf2a105 100644 --- a/src/ActorFrame.h +++ b/src/ActorFrame.h @@ -81,6 +81,7 @@ public: void SetFOV( float fFOV ) { m_fFOV = fFOV; } void SetVanishPoint( float fX, float fY) { m_fVanishX = fX; m_fVanishY = fY; } + void SetCustomLighting( bool bCustomLighting ) { m_bOverrideLighting = bCustomLighting; } void SetAmbientLightColor( RageColor c ) { m_ambientColor = c; } void SetDiffuseLightColor( RageColor c ) { m_diffuseColor = c; } void SetSpecularLightColor( RageColor c ) { m_specularColor = c; } From 5bd21965d3ad17727b57396289ae26fd0defbbd5 Mon Sep 17 00:00:00 2001 From: Jonathan Payne Date: Wed, 2 Mar 2011 23:58:52 -0800 Subject: [PATCH 2/6] Fouter~'e` --- Docs/Changelog_sm-ssc.txt | 1 + .../Scripts/03 ThemeAndGamePrefs.lua | 37 +++++++++++++++++++ .../ScreenGameplay decorations/default.lua | 3 ++ Themes/default/Languages/en.ini | 3 ++ Themes/default/metrics.ini | 9 ++++- 5 files changed, 52 insertions(+), 1 deletion(-) diff --git a/Docs/Changelog_sm-ssc.txt b/Docs/Changelog_sm-ssc.txt index 528db84a6a..a44354a134 100644 --- a/Docs/Changelog_sm-ssc.txt +++ b/Docs/Changelog_sm-ssc.txt @@ -17,6 +17,7 @@ sm-ssc v1.2.3 | 201103?? -------- * [ScreenGameplaySyncMachine] Allow themers to use either .ssc or .sm files. [AJ] * [ScreenHowToPlay] Allow themers to use either .ssc or .sm files. [AJ] +* [ScreenGameplay] Footer to prevent 'arrow overflow' [Midiman] 20110301 -------- diff --git a/Themes/_fallback/Scripts/03 ThemeAndGamePrefs.lua b/Themes/_fallback/Scripts/03 ThemeAndGamePrefs.lua index 1ad0a48266..8d3dd70aec 100644 --- a/Themes/_fallback/Scripts/03 ThemeAndGamePrefs.lua +++ b/Themes/_fallback/Scripts/03 ThemeAndGamePrefs.lua @@ -46,6 +46,7 @@ function InitUserPrefs() { "UserPrefProtimingP1", false}, { "UserPrefProtimingP2", false}, { "FlashyCombos", false}, + { "GameplayFooter", false}, }; for idx,pref in ipairs(Prefs) do @@ -323,6 +324,42 @@ function UserPrefFlashyCombo() setmetatable( t, t ); return t; end + +function UserPrefGameplayFooter() + local t = { + Name = "UserPrefGameplayFooter"; + LayoutType = "ShowAllInRow"; + SelectType = "SelectOne"; + OneChoiceForAllPlayers = true; + ExportOnChange = false; + Choices = { 'Off','On' }; + LoadSelections = function(self, list, pn) + if ReadPrefFromFile("GameplayFooter") ~= nil then + if GetUserPrefB("GameplayFooter") then + list[2] = true; + else + list[1] = true; + end; + else + WritePrefToFile("GameplayFooter",false); + list[1] = true; + end; + end; + SaveSelections = function(self, list, pn) + local val; + if list[2] then + val = true; + else + val = false; + end; + WritePrefToFile("GameplayFooter",val); + MESSAGEMAN:Broadcast("PreferenceSet", { Message == "Set Preference" } ); + THEME:ReloadMetrics(); + end; + }; + setmetatable( t, t ); + return t; +end --[[ end themeoption rows ]] --[[ game option rows ]] diff --git a/Themes/default/BGAnimations/ScreenGameplay decorations/default.lua b/Themes/default/BGAnimations/ScreenGameplay decorations/default.lua index 896a1e535c..63346394a4 100644 --- a/Themes/default/BGAnimations/ScreenGameplay decorations/default.lua +++ b/Themes/default/BGAnimations/ScreenGameplay decorations/default.lua @@ -130,9 +130,12 @@ for pn in ivalues(PlayerNumber) do end; }; end; + +t[#t+1] = StandardDecorationFromFileOptional("ScoreFrame","ScoreFrame"); t[#t+1] = StandardDecorationFromFileOptional("BPMDisplay","BPMDisplay"); t[#t+1] = StandardDecorationFromFileOptional("StageDisplay","StageDisplay"); t[#t+1] = StandardDecorationFromFileOptional("SongTitle","SongTitle"); + t[#t+1] = Def.ActorFrame { InitCommand=function(self) self:name("SongMeterDisplay"); diff --git a/Themes/default/Languages/en.ini b/Themes/default/Languages/en.ini index 6b950974ab..af1e60a2a5 100644 --- a/Themes/default/Languages/en.ini +++ b/Themes/default/Languages/en.ini @@ -70,6 +70,7 @@ UserPrefGameplayShowStepsDisplay=Show Steps UserPrefShowLotsaOptions=Options Density UserPrefLongFail=Fail Length UserPrefFlashyCombo=Flashy Combo +UserPrefGameplayFooter=Gameplay Footer [OptionExplanations] GamePrefAutoSetStyle=Allow the game to list all one player and two player modes at once instead of one style only. This might require a restart of StepMania\n( or alternatively hit F2! ) GamePrefNotePosition=Determines where the arrow receptors are placed in gameplay. @@ -82,6 +83,8 @@ UserPrefGameplayShowStepsDisplay=Show or Hide the step information display in ga UserPrefShowLotsaOptions=Choose how many lines/rows of options to choose from. &oq;Few&cq; keeps the list to a minimum. &oq;Many&cq; adds various show-off mods. UserPrefLongFail=Choose between the original sm-ssc fail (Long) or the new sm-ssc fail (Short). UserPrefFlashyCombo=Determine if combo flashes should be shown or not. +UserPrefGameplayFooter=If on, displays a footer that blocks visibility of incoming arrows for a certain region ( DDR's score frame ). + ScoringType=Defines which scoring method to use. If Special is selected, you can select a Special Scoring Mode in Theme Options. Speed=Adjust the speed at which arrows travel toward the targets. diff --git a/Themes/default/metrics.ini b/Themes/default/metrics.ini index cca7ef73d1..ee1cb21c86 100644 --- a/Themes/default/metrics.ini +++ b/Themes/default/metrics.ini @@ -824,7 +824,7 @@ ItemsLongRowSharedX=SCREEN_CENTER_X [ScreenOptionsTheme] Fallback="ScreenOptionsServiceChild" -LineNames="gNotePos,gAuto,gScore,gSScore,gSDisp,gOpts,gLongFail,gComboUnderField,FlashyCombo" +LineNames="gNotePos,gAuto,gScore,gSScore,gSDisp,gOpts,gLongFail,gComboUnderField,FlashyCombo,GameplayFooter" LinegNotePos="lua,GamePrefNotePosition()" LinegScore="lua,UserPrefGameplayShowScore()" LinegSScore="lua,UserPrefSpecialScoringMode()" @@ -834,6 +834,7 @@ LinegAuto="lua,GamePrefAutoSetStyle()" LinegLongFail="lua,UserPrefLongFail()" LinegComboUnderField="lua,GamePrefComboUnderField()" LineFlashyCombo="lua,UserPrefFlashyCombo()" +LineGameplayFooter="lua,UserPrefGameplayFooter()" [ScreenOptionsSystemDirection] LineNames="1,2,3,4,5,6,7,8,9,FlashyCombo,RollCombo,10,11,12,13,14,15,16,LF,17,18,19,20,21,22" LineLF="lua,UserPrefLongFail()" @@ -1435,6 +1436,12 @@ StageDisplayY=SCREEN_TOP+24 StageDisplayOnCommand=zoom,0.5; StageDisplayOffCommand=bounceend,0.25;zoom,0 # +ShowScoreFrame=GetUserPrefB("GameplayFooter"); +ScoreFrameX=SCREEN_CENTER_X +ScoreFrameY=SCREEN_BOTTOM +ScoreFrameOnCommand=vertalign,bottom;zoomtowidth,SCREEN_WIDTH+4;diffuse,color("#ffd400");addy,80;sleep,2;decelerate,0.5;addy,-80; +ScoreFrameOffCommand= +# LifeP1X=Center1Player() and SCREEN_CENTER_X or THEME:GetMetric(Var "LoadingScreen","PlayerP1OnePlayerOneSideX") # LifeP1X=(GAMESTATE:GetCurrentStyle():GetStyleType() == 'StyleType_OnePlayerTwoSides' or (PREFSMAN:GetPreference("Center1Player") and GAMESTATE:GetNumPlayersEnabled() == 1)) and SCREEN_CENTER_X or THEME:GetMetric(Var "LoadingScreen","PlayerP1OnePlayerOneSideX") LifeP1Y=SCREEN_TOP+24 From b9dac6b4b81f18d6cf4ef4523aeed7d34a0df050 Mon Sep 17 00:00:00 2001 From: Jonathan Payne Date: Thu, 3 Mar 2011 00:10:22 -0800 Subject: [PATCH 3/6] bouncers --- Themes/default/Graphics/Player judgment/default.lua | 13 +++++++++++++ Themes/default/metrics.ini | 4 +++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Themes/default/Graphics/Player judgment/default.lua b/Themes/default/Graphics/Player judgment/default.lua index a051ded80a..33e2dafde2 100644 --- a/Themes/default/Graphics/Player judgment/default.lua +++ b/Themes/default/Graphics/Player judgment/default.lua @@ -33,6 +33,9 @@ local ProtimingCmds = { local AverageCmds = { Pulse = THEME:GetMetric( "Protiming", "AveragePulseCommand" ); }; +local TextCmds = { + Pulse = THEME:GetMetric( "Protiming", "TextPulseCommand" ); +}; local TNSFrames = { TapNoteScore_W1 = 0; @@ -64,6 +67,13 @@ t[#t+1] = Def.ActorFrame { OnCommand=THEME:GetMetric("Protiming","AverageOnCommand"); ResetCommand=cmd(finishtweening;stopeffect;visible,false); }; + LoadFont("Common Normal") .. { + Name="TextDisplay"; + Text="MS"; + InitCommand=cmd(visible,false); + OnCommand=THEME:GetMetric("Protiming","TextOnCommand"); + ResetCommand=cmd(finishtweening;stopeffect;visible,false); + }; Def.Quad { Name="ProtimingGraphBG"; InitCommand=cmd(visible,false;y,32;zoomto,192,16); @@ -166,6 +176,9 @@ t[#t+1] = Def.ActorFrame { c.ProtimingAverage:settextf("%.2f%%",clamp(100 - MakeAverage( tTotalJudgments ) * 1000 ,0,100)); AverageCmds['Pulse'](c.ProtimingAverage); + c.TextDisplay:visible( bShowProtiming ); + TextCmds['Pulse'](c.TextDisplay); + c.ProtimingGraphBG:visible( bShowProtiming ); c.ProtimingGraphUnderlay:visible( bShowProtiming ); c.ProtimingGraphWindowW3:visible( bShowProtiming ); diff --git a/Themes/default/metrics.ini b/Themes/default/metrics.ini index ee1cb21c86..cd08a96aa0 100644 --- a/Themes/default/metrics.ini +++ b/Themes/default/metrics.ini @@ -307,6 +307,7 @@ RightOnCommand=horizalign,left;diffuse,PlayerColor(PLAYER_2) [Protiming] ProtimingOnCommand=shadowlength,1;horizalign,right;x,30;strokecolor,Color("Outline");skewx,-0.125;textglowmode,"TextGlowMode_Inner"; AverageOnCommand=shadowlength,1;horizalign,left;x,32;y,8;zoom,0.75;diffuse,ColorLightTone( Color("Green") );strokecolor,Color("Outline");skewx,-0.125;textglowmode,"TextGlowMode_Inner"; +TextOnCommand=shadowlength,1;horizalign,left;x,32;y,-6;zoom,0.5;strokecolor,Color("Outline");skewx,-0.125;textglowmode,"TextGlowMode_Inner"; # ProtimingW1Command=finishtweening;diffuse,Color("White");zoom,1.15;glow,Color("White");linear,0.05;zoom,1;glow,Color("Invisible");diffuse,GameColor.Judgment["JudgmentLine_W1"];sleep,2;linear,0.5;diffuse,Color("Invisible"); ProtimingW2Command=finishtweening;diffuse,Color("White");zoom,1.15;glow,Color("White");linear,0.05;zoom,1;glow,Color("Invisible");diffuse,GameColor.Judgment["JudgmentLine_W2"];sleep,2;linear,0.5;diffuse,Color("Invisible"); @@ -315,7 +316,8 @@ ProtimingW4Command=finishtweening;diffuse,Color("White");zoom,1.15;glow,Color("W ProtimingW5Command=finishtweening;diffuse,Color("White");zoom,1.15;glow,Color("White");linear,0.05;zoom,1;glow,Color("Invisible");diffuse,GameColor.Judgment["JudgmentLine_W5"];sleep,2;linear,0.5;diffuse,Color("Invisible"); ProtimingMissCommand=finishtweening;diffusealpha,1;zoom,1.15;glow,GameColor.Judgment["JudgmentLine_Miss"];linear,0.05;zoom,1;glow,Color("Invisible");diffuse,GameColor.Judgment["JudgmentLine_Miss"];sleep,2;linear,0.5;diffuse,Color("Invisible"); # -AveragePulseCommand=finishtweening;diffusealpha,1;zoom,0.75*1.25;decelerate,0.05;zoom,0.75;sleep,2;linear,0.5;diffusealpha,0; +AveragePulseCommand=finishtweening;diffusealpha,1;zoom,0.75*1.025;decelerate,0.05;zoom,0.75;sleep,2;linear,0.5;diffusealpha,0; +TextPulseCommand=finishtweening;diffusealpha,1;zoom,0.5*1.025;decelerate,0.05;zoom,0.5;sleep,2;linear,0.5;diffusealpha,0; [Player] # ReceptorArrowsYStandard=GetTapPosition('Standard') # ReceptorArrowsYReverse=GetTapPosition('Reverse') From c1858f6920474ff4e69b7fc7f846e2bb4bcdd1b9 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Fri, 4 Mar 2011 20:55:39 -0600 Subject: [PATCH 4/6] cleanup and a small doxy note --- src/TimingData.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/TimingData.h b/src/TimingData.h index 9c2e0b9fe9..022116102e 100644 --- a/src/TimingData.h +++ b/src/TimingData.h @@ -11,7 +11,7 @@ struct lua_State; /** * @brief Identifies when a song changes its BPM. */ -struct BPMSegment +struct BPMSegment { /** * @brief Creates a simple BPM Segment with default values. @@ -99,7 +99,7 @@ struct BPMSegment * * It is hopeful that stops and delays can be made into their own segments at some point. */ -struct StopSegment +struct StopSegment { /** * @brief Creates a simple Stop Segment with default values. @@ -208,7 +208,7 @@ struct StopSegment * This only supports simple time signatures. The upper number (called the numerator here, though this isn't * properly a fraction) is the number of beats per measure. The lower number (denominator here) * is the note value representing one beat. */ -struct TimeSignatureSegment +struct TimeSignatureSegment { /** * @brief Creates a simple Time Signature Segment with default values. @@ -218,6 +218,7 @@ struct TimeSignatureSegment * @brief Creates a Time Signature Segment at the given row with a supplied numerator. * @param r the starting row of the segment. * @param n the numerator for the segment. + * This creates a TimeSignature with the specified row and numerator. The denominator will be 4. */ TimeSignatureSegment( int r, int n ) { m_iStartRow = max( 0, r ); From 25ce296a969dfdc190c71c3d179c08fe025f429b Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Fri, 4 Mar 2011 22:05:44 -0500 Subject: [PATCH 5/6] Put comment in the right position. Try to only put @returns after @params. --- src/TimingData.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/TimingData.h b/src/TimingData.h index 022116102e..7283a1c09f 100644 --- a/src/TimingData.h +++ b/src/TimingData.h @@ -216,9 +216,10 @@ struct TimeSignatureSegment TimeSignatureSegment() : m_iStartRow(-1), m_iNumerator(4), m_iDenominator(4) { } /** * @brief Creates a Time Signature Segment at the given row with a supplied numerator. + * + * The denominator will be 4 if this is called. * @param r the starting row of the segment. * @param n the numerator for the segment. - * This creates a TimeSignature with the specified row and numerator. The denominator will be 4. */ TimeSignatureSegment( int r, int n ) { m_iStartRow = max( 0, r ); From 9b07d1f392800c4154f29fc07a83be08723dcc9b Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Fri, 4 Mar 2011 22:12:08 -0500 Subject: [PATCH 6/6] Allow setting Stops and Delays on the same row. --- src/TimingData.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TimingData.cpp b/src/TimingData.cpp index 7fb9f60786..050b2436c9 100644 --- a/src/TimingData.cpp +++ b/src/TimingData.cpp @@ -81,10 +81,10 @@ void TimingData::SetStopAtRow( int iRow, float fSeconds, bool bDelay ) { unsigned i; for( i=0; i 0 || PREFSMAN->m_bQuirksMode )