Bring in updates to the combos branch.

This commit is contained in:
Jason Felds
2011-03-04 22:20:29 -05:00
10 changed files with 80 additions and 8 deletions
+1
View File
@@ -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
--------
@@ -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 ]]
@@ -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");
@@ -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 );
+3
View File
@@ -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.
+11 -2
View File
@@ -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')
@@ -824,7 +826,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 +836,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 +1438,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
+4 -1
View File
@@ -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 );
+1
View File
@@ -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; }
+2 -2
View File
@@ -86,10 +86,10 @@ void TimingData::SetStopAtRow( int iRow, float fSeconds, bool bDelay )
{
unsigned i;
for( i=0; i<m_StopSegments.size(); i++ )
if( m_StopSegments[i].m_iStartRow == iRow )
if( m_StopSegments[i].m_iStartRow == iRow && m_StopSegments[i].m_bDelay == bDelay )
break;
if( i == m_StopSegments.size() ) // there is no StopSegment at the current beat
if( i == m_StopSegments.size() ) // there is no Stop/Delay Segment at the current beat
{
// create a new StopSegment
if( fSeconds > 0 || PREFSMAN->m_bQuirksMode )
+5 -3
View File
@@ -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.
@@ -216,6 +216,8 @@ 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.
*/