[default -> loading window] Pulling in latest work.

This commit is contained in:
Henrik Andersson
2011-07-07 11:20:24 +02:00
46 changed files with 913 additions and 297 deletions
+41 -1
View File
@@ -5,7 +5,47 @@ from StepMania 4 alpha 5 to sm-ssc v1.2.5, see Changelog_sm-ssc.txt.
________________________________________________________________________________ ________________________________________________________________________________
================================================================================ ================================================================================
StepMania 5.0 Preview 2 | 201107?? StepMania 5.0 ????????? | 20110???
--------------------------------------------------------------------------------
2011/07/07
----------
* [ScreenEdit] Fix the NoMines transformation bug, issue 363. [Wolfman2000]
2011/07/06
----------
* [ScreenEdit] Fix the bug where hitting Enter during playing wouldn't take
the user back to the editor. [Wolfman2000]
* [Gameplay] Fix Fail mods being dishonored. [Midiman]
2011/07/05
----------
* [ScreenEdit] Restore dance-couple and pump-couple for editing purposes.
Saving should still work, but this was never tested yet. [Wolfman2000]
* [ScreenOptions] Mini is now ITG Mini, and Tiny is now Pump Pro Mini.
This will prevent many prior courses from breaking. [sharksoda, Wolfman2000]
* [CharacterManager] Add a lua function to check how many characters you have.
For an example of how this is used, check the default theme's scripts
folder, specifically 03 ThemePrefs.lua. [Wolfman2000]
2011/07/04
----------
* [ScreenEdit] Add a function to switch the notes the routine players have to
hit. In simple terms, Player 1's notes are now Player 2's and vice~versa.
Check it out in the Alter Menu. [Wolfman2000]
* [ScreenEdit] Add two routine mirroring functions. Now you can build sections
of a chart for one player, and mirror the effect for the other player when
finished. For Pump players, it is not a straight mirror, but is more akin
to what is found via normal routine charts. In other words, you'll be happy.
Check it out in the Alter Menu. [Wolfman2000]
2011/07/03
----------
* [ScreenEdit] Fix a crash if one tries to remove an attack that doesn't
exist at that time. [Wolfman2000]
================================================================================
StepMania 5.0 Preview 2 | 20110703
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
2011/07/03 2011/07/03
+7 -4
View File
@@ -153,6 +153,7 @@
<Function name='SelectMusicOrCourse'/> <Function name='SelectMusicOrCourse'/>
<Function name='SelectProfileKeys'/> <Function name='SelectProfileKeys'/>
<Function name='Serialize'/> <Function name='Serialize'/>
<Function name='SetFail'/>
<Function name='SetGamePref'/> <Function name='SetGamePref'/>
<Function name='SetThemePref'/> <Function name='SetThemePref'/>
<Function name='SetUserPref'/> <Function name='SetUserPref'/>
@@ -579,6 +580,7 @@
<Function name='GetAllCharacters'/> <Function name='GetAllCharacters'/>
<Function name='GetCharacter'/> <Function name='GetCharacter'/>
<Function name='GetRandomCharacter'/> <Function name='GetRandomCharacter'/>
<Function name='GetCharacterCount'/>
</Class> </Class>
<Class base='ActorFrame' name='ComboGraph'> <Class base='ActorFrame' name='ComboGraph'>
<Function name='Load'/> <Function name='Load'/>
@@ -932,6 +934,7 @@
<Function name='GetMines'/> <Function name='GetMines'/>
<Function name='GetMini'/> <Function name='GetMini'/>
<Function name='GetMirror'/> <Function name='GetMirror'/>
<Function name='GetNoAttacks'/>
<Function name='GetNoFakes'/> <Function name='GetNoFakes'/>
<Function name='GetNoHands'/> <Function name='GetNoHands'/>
<Function name='GetNoHolds'/> <Function name='GetNoHolds'/>
@@ -1477,8 +1480,8 @@
<Function name='GetCode'/> <Function name='GetCode'/>
<Function name='GetCourse'/> <Function name='GetCourse'/>
<Function name='GetDescription'/> <Function name='GetDescription'/>
<Function name='GetRequirePassHardSteps'/>
<Function name='GetRequirePassChallengeSteps'/> <Function name='GetRequirePassChallengeSteps'/>
<Function name='GetRequirePassHardSteps'/>
<Function name='GetRequirement'/> <Function name='GetRequirement'/>
<Function name='GetSong'/> <Function name='GetSong'/>
<Function name='GetUnlockRewardType'/> <Function name='GetUnlockRewardType'/>
@@ -2130,9 +2133,9 @@
<Constant name='left' value='&apos;HorizAlign_Left&apos;'/> <Constant name='left' value='&apos;HorizAlign_Left&apos;'/>
<Constant name='middle' value='&apos;VertAlign_Middle&apos;'/> <Constant name='middle' value='&apos;VertAlign_Middle&apos;'/>
<Constant name='right' value='&apos;HorizAlign_Right&apos;'/> <Constant name='right' value='&apos;HorizAlign_Right&apos;'/>
<Constant name='sGame' value='&apos;pump&apos;'/> <Constant name='sGame' value='&apos;dance&apos;'/>
<Constant name='top' value='&apos;VertAlign_Top&apos;'/> <Constant name='top' value='&apos;VertAlign_Top&apos;'/>
</Constants> </Constants>
<Version>StepMania 5 v5.0 Preview 1a</Version> <Version>StepMania 5 v5.0 Preview 2</Version>
<Date>2011-06-24</Date> <Date>2011-07-04</Date>
</Lua> </Lua>
+1
View File
@@ -400,6 +400,7 @@
$type='LuaOptionRow' or $type='LuaOptionRow' or
$type='ActorDef' or $type='ActorDef' or
$type='chunk' or $type='chunk' or
$type='unsigned' or
$type='various'"> $type='various'">
<span class="primitiveType"> <span class="primitiveType">
<xsl:value-of select="$type" /> <xsl:value-of select="$type" />
+272 -26
View File
@@ -23,6 +23,9 @@
<Documentation xmlns='http://www.stepmania.com' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.stepmania.com Lua.xsd'> <Documentation xmlns='http://www.stepmania.com' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.stepmania.com Lua.xsd'>
<!-- Global functions --> <!-- Global functions -->
<GlobalFunctions> <GlobalFunctions>
<Function name='Alpha' theme='_fallback' return='color' arguments='color c, float percent'>
[03 HSV.lua] Returns a <code>color</code> with the specified alpha.
</Function>
<Function name='AreStagePlayerModsForced' theme='_fallback' return='bool' arguments=''> <Function name='AreStagePlayerModsForced' theme='_fallback' return='bool' arguments=''>
[02 StageMods.lua] [02 StageMods.lua]
</Function> </Function>
@@ -36,10 +39,10 @@
Returns the base name of file path. Returns the base name of file path.
</Function> </Function>
<Function name='BoostColor' theme='_fallback' return='color' arguments='color c, float fBoost'> <Function name='BoostColor' theme='_fallback' return='color' arguments='color c, float fBoost'>
[02 Colors.lua] [02 Colors.lua] Boosts the specified color by multiplying its values by <code>fBoost</code>.
</Function> </Function>
<Function name='Brightness' theme='_fallback' return='color' arguments='color c, float percent'> <Function name='Brightness' theme='_fallback' return='color' arguments='color c, float percent'>
[03 HSV.lua] [03 HSV.lua] Modifies the brightness of the specified color.
</Function> </Function>
<Function name='Center1Player' theme='_fallback' return='bool' arguments=''> <Function name='Center1Player' theme='_fallback' return='bool' arguments=''>
[03 ProductivityHelpers.lua] Returns <code>true</code> if Center 1P is being used. [03 ProductivityHelpers.lua] Returns <code>true</code> if Center 1P is being used.
@@ -48,7 +51,8 @@
[03 Gameplay.lua] [03 Gameplay.lua]
</Function> </Function>
<Function name='clamp' return='float' arguments='float fValue, float fLow, float fHigh'> <Function name='clamp' return='float' arguments='float fValue, float fLow, float fHigh'>
CLAMP is an all-female Japanese mangaka group that formed in the mid 1980s. Erm, I mean... Clamps <code>fValue</code> between <code>fLow</code> and <code>fHigh</code>. CLAMP is an all-female Japanese mangaka group that formed in the mid 1980s.
Erm, I mean... Clamps <code>fValue</code> between <code>fLow</code> and <code>fHigh</code>.
</Function> </Function>
<Function name='CloseConnection' return='void' arguments=''> <Function name='CloseConnection' return='void' arguments=''>
Closes any connection to an online server. Closes any connection to an online server.
@@ -59,6 +63,21 @@
<Function name='color' return='color' arguments='string color'> <Function name='color' return='color' arguments='string color'>
Returns a color from a string. <code>color</code> can be in hex (<code>"#FFFFFFFF"</code>) or 0..1 values (<code>"1.0,1.0,1.0,1.0"</code>), in RGBA order. Returns a color from a string. <code>color</code> can be in hex (<code>"#FFFFFFFF"</code>) or 0..1 values (<code>"1.0,1.0,1.0,1.0"</code>), in RGBA order.
</Function> </Function>
<Function name='ColorDarkTone' theme='_fallback' return='' arguments='color c'>
[02 Colors.lua] Returns a darker tone of the color. (Specifically <code>c[1]/2, c[2]/2, c[3]/2, c[4]</code>)
</Function>
<Function name='ColorLightTone' theme='_fallback' return='' arguments='color c'>
[02 Colors.lua] Returns a lighter tone of the color. (Specifically <code>c[1]+(c[1]/2), c[2]+(c[2]/2), c[3]+(c[3]/2), c[4]</code>)
</Function>
<Function name='ColorMidTone' theme='_fallback' return='' arguments='color c'>
[02 Colors.lua] Returns a midtone of the color. (Specifically <code>c[1]/1.5, c[2]/1.5, c[3]/1.5, c[4]</code>)
</Function>
<Function name='ColorToHex' theme='_fallback' return='string' arguments='color c'>
[03 HSV.lua] Returns a hex representation for the specified color.
</Function>
<Function name='ColorToHSV' theme='_fallback' return='table' arguments='color c'>
[03 HSV.lua] Takes in a color and returns a table with the HSV values.
</Function>
<Function name='ComboContinue' theme='_fallback' return='TapNoteScore' arguments=''> <Function name='ComboContinue' theme='_fallback' return='TapNoteScore' arguments=''>
[03 Gameplay.lua] Determines what TapNoteScore allows for continuing the combo. [03 Gameplay.lua] Determines what TapNoteScore allows for continuing the combo.
</Function> </Function>
@@ -68,6 +87,12 @@
<Function name='ComboPerRow' theme='_fallback' return='bool' arguments=''> <Function name='ComboPerRow' theme='_fallback' return='bool' arguments=''>
[03 Gameplay.lua] Determines if combo should be per row (Jump = 1) or per column (Jump = 2). [03 Gameplay.lua] Determines if combo should be per row (Jump = 1) or per column (Jump = 2).
</Function> </Function>
<Function name='ComboTransformCommand' theme='_fallback' return='void' arguments='Actor self, params p'>
[02 Other.lua] The combo trasform command.
</Function>
<Function name='ComboUnderField' theme='_fallback' return='bool' arguments=''>
[03 Gameplay.lua] Returns the <code>UserPrefComboUnderField</code> user preference value.
</Function>
<Function name='ConnectToServer' return='bool' arguments='string sAddress'> <Function name='ConnectToServer' return='bool' arguments='string sAddress'>
Tries to connect to the server at <code>sAddress</code>. Tries to connect to the server at <code>sAddress</code>.
</Function> </Function>
@@ -77,14 +102,23 @@
<Function name='DayOfYear' return='int' arguments=''> <Function name='DayOfYear' return='int' arguments=''>
Returns the current day of the year. Returns the current day of the year.
</Function> </Function>
<Function name='DeepCopy' theme='_fallback' return='table' arguments='table from, table to, table already_copied'>
[02 Serialize] Recursively deep-copy a table.
</Function>
<Function name='dofile' theme='_fallback' return='chunk' arguments='string sFilePath'> <Function name='dofile' theme='_fallback' return='chunk' arguments='string sFilePath'>
[01 base.lua] "Override Lua's dofile to use our <Link function="loadfile">loadfile</Link>." [01 base.lua] "Override Lua's dofile to use our <Link function="loadfile">loadfile</Link>."
</Function> </Function>
<Function name='fapproach' theme='_fallback' return='float' arguments='float val, float other_val, float to_move'>
[02 Utilities.lua]
</Function>
<Function name='FindSelection' theme='_fallback' return='int' arguments='table list'>
[02 Utilities.lua] Return the index of a true value in <code>list</code>.
</Function>
<Function name='FindValue' theme='_fallback' return='string' arguments='table tab, various value'> <Function name='FindValue' theme='_fallback' return='string' arguments='table tab, various value'>
[02 Utilities.lua] Find a key in <code>tab</code> with the given <code>value</code>. [02 Utilities.lua] Find a key in <code>tab</code> with the given <code>value</code>.
</Function> </Function>
<Function name='FindSelection' theme='_fallback' return='int' arguments='table list'> <Function name='foreach_ordered' theme='_fallback' return='void' arguments='table t, function f'>
[02 Utilities.lua] Return the index of a true value in <code>list</code>. <code>func</code> takes a key and a value.
</Function> </Function>
<Function name='FormatNumberAndSuffix' return='string' arguments='int num'> <Function name='FormatNumberAndSuffix' return='string' arguments='int num'>
Returns the number passed to the function followed by its suffix (&quot;th&quot;, &quot;nd&quot;, and so on). Returns the number passed to the function followed by its suffix (&quot;th&quot;, &quot;nd&quot;, and so on).
@@ -98,6 +132,12 @@
<Function name='GetCustomDifficulty' return='string' arguments='StepsType st, Difficulty d, CourseType ct'> <Function name='GetCustomDifficulty' return='string' arguments='StepsType st, Difficulty d, CourseType ct'>
Returns the corresponding CustomDifficulty string for a StepsType/Difficulty (/optional CourseType) combination. Returns the corresponding CustomDifficulty string for a StepsType/Difficulty (/optional CourseType) combination.
</Function> </Function>
<Function name='GetDirectRadar' theme='_fallback' return='RadarValues' arguments='PlayerNumber pn'>
[04 Scoring.lua] "Get the radar values directly. The individual steps aren't used much."
</Function>
<Function name='GetEditModeSubScreens' theme='_fallback' return='string' arguments=''>
[02 Other.lua] Returns a string with the Edit Mode SubScreens.
</Function>
<Function name='getenv' theme='_fallback' return='various' arguments='string name'> <Function name='getenv' theme='_fallback' return='various' arguments='string name'>
[03 EnvUtils2.lua] Returns the value of <code>name</code> from the Env table. [03 EnvUtils2.lua] Returns the value of <code>name</code> from the Env table.
</Function> </Function>
@@ -113,21 +153,45 @@
<Function name='GetOSName' return='string' arguments=''> <Function name='GetOSName' return='string' arguments=''>
Returns a string representing the name of the operating system being used. (e.g. "Windows", "Linux", "Mac, "Unknown") Returns a string representing the name of the operating system being used. (e.g. "Windows", "Linux", "Mac, "Unknown")
</Function> </Function>
<Function name='GetPlayerOrMachineProfile' theme='_fallback' return='Profile' arguments='PlayerNumber pn'>
[03 ProductivityHelpers.lua] "This returns a profile, preferably a player one. If there isn't one, [it falls] back on the machine profile."
</Function>
<Function name='GetProTiming' theme='default' return='bool' arguments='PlayerNumber pn'> <Function name='GetProTiming' theme='default' return='bool' arguments='PlayerNumber pn'>
[03 ThemePrefs.lua] Returns <code>true</code> if player <code>pn</code> is using ProTiming. [03 ThemePrefs.lua] Returns <code>true</code> if player <code>pn</code> is using ProTiming.
</Function> </Function>
<Function name='GetRandomSongBackground' theme='_fallback' return='string' arguments=''> <Function name='GetRandomSongBackground' theme='_fallback' return='string' arguments=''>
[02 Utilities.lua] Returns a path to a random song background. [02 Utilities.lua] Returns a path to a random song background.
</Function> </Function>
<Function name='GetReal' theme="_fallback" return='float' arguments=''>
[03 ProductivityHelpers.lua]
</Function>
<Function name='GetRealInverse' theme="_fallback" return='float' arguments=''>
[03 ProductivityHelpers.lua]
</Function>
<Function name='GetScreenAspectRatio' return='float' arguments=''>
Returns the display aspect ratio.
</Function>
<Function name='GetServerName' return='string' arguments=''> <Function name='GetServerName' return='string' arguments=''>
Returns the name of the currently connected server. Returns the name of the currently connected server.
</Function> </Function>
<Function name='GetSongBackground' theme='_fallback' return='string' arguments=''> <Function name='GetSongBackground' theme='_fallback' return='string' arguments=''>
[02 Utilities.lua] Returns a path to the current songs background. [02 Utilities.lua] Returns a path to the current songs background.
</Function> </Function>
<Function name='GetTapPosition' theme='_fallback' return='float' arguments=''>
[03 Gameplay.lua]
</Function>
<Function name='GetThemeAspectRatio' return='float' arguments=''> <Function name='GetThemeAspectRatio' return='float' arguments=''>
Returns the theme's aspect ratio. Returns the theme's aspect ratio.
</Function> </Function>
<Function name='GetThemePref' theme='_fallback' return='' arguments=''>
[03 ThemePrefs.lua] (Alias for <Link class='ThemePrefs' function='Get' />.)
</Function>
<Function name='GetTimingDifficulty' return='int' arguments=''>
Returns the current Timing difficulty.
</Function>
<Function name='GetTotalItems' theme='_fallback' return='float' arguments='RadarValues radars'>
[04 Scoring.lua] "Retrieve the amount of taps/holds/rolls involved." Used in some scoring formulas.
</Function>
<Function name='GetUserPref' theme='_fallback' return='string' arguments='string name'> <Function name='GetUserPref' theme='_fallback' return='string' arguments='string name'>
[03 UserPreferences2.lua] Themer-facing function for getting a user preference. [03 UserPreferences2.lua] Themer-facing function for getting a user preference.
</Function> </Function>
@@ -140,9 +204,38 @@
<Function name='GetUserPrefN' theme='_fallback' return='float' arguments='string name'> <Function name='GetUserPrefN' theme='_fallback' return='float' arguments='string name'>
[03 UserPreferences2.lua] Themer-facing function for getting a user preference as a number. [03 UserPreferences2.lua] Themer-facing function for getting a user preference as a number.
</Function> </Function>
<Function name='HasAlpha' theme='_fallback' return='float' arguments='color c'>
[03 HSV.lua] Returns the color's alpha if it has any, otherwise returns 1.
</Function>
<Function name='HitCombo' theme='_fallback' return='int' arguments=''>
[03 Gameplay.lua] Returns the value to start showing the combo at.
</Function>
<Function name='HoldHeadStep' theme='_fallback' return='bool' arguments=''>
[03 Gameplay.lua] Returns <code>true</code> if you need to step on hold heads to activate them.
</Function>
<Function name='HoldTiming' theme='_fallback' return='float' arguments=''>
[03 Gameplay.lua] Returns 0 in <code>pump</code> mode, <code>TimingWindowSecondsHold</code> preference value in any other game mode.
</Function>
<Function name='Hour' return='int' arguments=''> <Function name='Hour' return='int' arguments=''>
Returns the current hour. Returns the current hour.
</Function> </Function>
<Function name='HSV' theme='_fallback' return='color' arguments='float h, float s, float v'>
[03 HSV.lua] Converts a color from HSV values to something StepMania can understand.
hue is from <code>0-360</code>, saturation and value are <code>0..1</code>
</Function>
<Function name='HSVA' theme='_fallback' return='color' arguments='float h, float s, float v, float a'>
[03 HSV.lua] Converts a color from HSV values with alpha to something StepMania can understand.
hue is from <code>0-360</code>, saturation, value, and alpha are <code>0..1</code>
</Function>
<Function name='HSVToColor' theme='_fallback' return='color' arguments='table hsv'>
[03 HSV.lua] "Converts a set of HSV values to a color."
</Function>
<Function name='HSVToHex' theme='_fallback' return='string' arguments='table hsv'>
[03 HSV.lua] "Takes in a normal color and returns the hex representation. (Adapted from code in LuaBit)"
</Function>
<Function name='Hue' theme='_fallback' return='color' arguments='color c, int newHue'>
[03 HSV.lua] Changes the hue of the input color.
</Function>
<Function name='InitUserPrefs' theme='default' return='void' arguments=''> <Function name='InitUserPrefs' theme='default' return='void' arguments=''>
[03 ThemePrefs.lua] Initializes various user preferences. [03 ThemePrefs.lua] Initializes various user preferences.
</Function> </Function>
@@ -206,6 +299,12 @@
<Function name='Minute' return='int' arguments=''> <Function name='Minute' return='int' arguments=''>
Returns the current Minute. Returns the current Minute.
</Function> </Function>
<Function name='MissCombo' theme='_fallback' return='int' arguments=''>
[03 Gameplay.lua] Returns the value to start showing the miss combo at.
</Function>
<Function name='module' return='' arguments='string name, ...'>
Creates a module. See the Lua manual for more details.
</Function>
<Function name='MonthOfYear' return='int' arguments=''> <Function name='MonthOfYear' return='int' arguments=''>
Returns the current month of the year. Returns the current month of the year.
</Function> </Function>
@@ -215,6 +314,20 @@
<Function name='MonthToString' return='string' arguments='Month m'> <Function name='MonthToString' return='string' arguments='Month m'>
Returns Month <code>m</code> as a string. Returns Month <code>m</code> as a string.
</Function> </Function>
<Function name='next' return='' arguments='table t, int index'>
"Allows a program to traverse all fields of a table. Its first argument is a
table and its second argument is an index in this table.
<code>next</code> returns the next index of the table and its associated value."
See the Lua manual for more details.
</Function>
<Function name='OptionRowProTiming' theme='default' return='LuaOptionRow' arguments=''>
[03 ThemePrefs.lua] Returns a Lua option row for ProTiming.
</Function>
<Function name='pairs' return='' arguments='table t'>
"Returns three values: the <Link class='GLOBAL' function='next' /> function, the table <code>t</code>, and <code>nil</code>,
so that the construction <code>for k,v in pairs(t) do body end</code>
will iterate over all keyvalue pairs of table <code>t</code>."
</Function>
<Function name='pname' theme='_fallback' return='string' arguments='PlayerNumber pn'> <Function name='pname' theme='_fallback' return='string' arguments='PlayerNumber pn'>
[03 ProductivityHelpers.lua] Converts a PlayerNumber into a short string (e.g. "P1", "P2"). [03 ProductivityHelpers.lua] Converts a PlayerNumber into a short string (e.g. "P1", "P2").
</Function> </Function>
@@ -233,6 +346,16 @@
<Function name='ProductVersion' return='string' arguments=''> <Function name='ProductVersion' return='string' arguments=''>
Returns the product version. Returns the product version.
</Function> </Function>
<Function name='rawequal' return='bool' arguments='various v1, varoius v2'>
"Checks whether <code>v1</code> is equal to <code>v2</code>, without invoking any metamethod."
</Function>
<Function name='rawget' return='various' arguments='table t, various index'>
"Gets the real value of <code>t[index]</code>, without invoking any metamethod."
</Function>
<Function name='rawset' return='table' arguments='table t, int index, various value'>
"Sets the real value of <code>t[index]</code> to <code>value</code>, without invoking any metamethod."
The modified <code>t</code> is then returned.
</Function>
<Function name='ResolveRelativePath' theme='_fallback' return='string' arguments='string path, int level'> <Function name='ResolveRelativePath' theme='_fallback' return='string' arguments='string path, int level'>
[02 ActorDef.lua] [02 ActorDef.lua]
</Function> </Function>
@@ -242,12 +365,27 @@
<Function name='ReadPrefFromFile' theme='_fallback' return='string' arguments='string prefName'> <Function name='ReadPrefFromFile' theme='_fallback' return='string' arguments='string prefName'>
[03 UserPreferences2.lua] (internal) Reads the specified user preference from its config file. [03 UserPreferences2.lua] (internal) Reads the specified user preference from its config file.
</Function> </Function>
<Function name='ReportStyle' return='void' arguments=''>
Sends the current style to the server.
</Function>
<Function name='require' return='' arguments='string modname'>
Loads the specified module. See the Lua manual for more information.
</Function>
<Function name='round' theme='_fallback' return='int' arguments='float val, int decimal'> <Function name='round' theme='_fallback' return='int' arguments='float val, int decimal'>
[02 Utilities.lua] Round a number. [02 Utilities.lua] Round a number.
</Function> </Function>
<Function name='Saturation' theme='_fallback' return='color' arguments='color c, float percent'>
[03 HSV.lua] Modifies the saturation of the specified color
</Function>
<Function name='ScoreKeeperClass' theme='_fallback' return='string' arguments=''> <Function name='ScoreKeeperClass' theme='_fallback' return='string' arguments=''>
[03 Gameplay.lua] Returns the primary ScoreKeeper class to use. [03 Gameplay.lua] Returns the primary ScoreKeeper class to use.
</Function> </Function>
<Function name='ScreenMetric' theme='_fallback' return='string' arguments='string s'>
[00 alias.lua, 02 Other.lua] alias for <Link class='Screen' function='Metric' />.
</Function>
<Function name='ScreenString' theme='_fallback' return='string' arguments='string s'>
[00 alias.lua, 02 Other.lua] alias for <Link class='Screen' function='String' />.
</Function>
<Function name='Second' return='int' arguments=''> <Function name='Second' return='int' arguments=''>
Returns the current second. Returns the current second.
</Function> </Function>
@@ -269,12 +407,20 @@
<Function name='SecondsToMMSSMsMsMs' return='string' arguments='float fSecs'> <Function name='SecondsToMMSSMsMsMs' return='string' arguments='float fSecs'>
Converts <code>fSecs</code> to Minutes:Seconds.Milliseconds format using two digits for each section except Milliseconds (uses 3). Converts <code>fSecs</code> to Minutes:Seconds.Milliseconds format using two digits for each section except Milliseconds (uses 3).
</Function> </Function>
<Function name='select' return='various' arguments='various index, ...'>
"If <code>index</code> is a number, returns all arguments after argument
number <code>index</code>. Otherwise, <code>index</code> must be the string
<code>"#"</code>, and [it] returns the total number of extra arguments it received."
</Function>
<Function name='SelectMusicOrCourse' theme='_fallback' return='string' arguments=''> <Function name='SelectMusicOrCourse' theme='_fallback' return='string' arguments=''>
[02 Branches.lua] Determines the correct music/course selection screen to use and returns it. [02 Branches.lua] Determines the correct music/course selection screen to use and returns it.
</Function> </Function>
<Function name='SelectProfileKeys' theme='_fallback' return='string' arguments=''> <Function name='SelectProfileKeys' theme='_fallback' return='string' arguments=''>
[03 Gameplay.lua] (soon to be deprecated) Returns a list of codes to use on ScreenSelectProfile. [03 Gameplay.lua] (soon to be deprecated) Returns a list of codes to use on ScreenSelectProfile.
</Function> </Function>
<Function name='Serialize' return='string' arguments='table t'>
[02 Serialize.lua] Serialize the table <code>t</code>.
</Function>
<Function name='setenv' theme='_fallback' return='various' arguments='string name, various value'> <Function name='setenv' theme='_fallback' return='various' arguments='string name, various value'>
[03 EnvUtils2.lua] Sets the value of <code>name</code> to <code>value</code> in the Env table. [03 EnvUtils2.lua] Sets the value of <code>name</code> to <code>value</code> in the Env table.
</Function> </Function>
@@ -299,6 +445,12 @@
<Function name='StandardDecorationFromFileOptional' theme='_fallback' return='Actor' arguments='string sMetricsName, string sFileName'> <Function name='StandardDecorationFromFileOptional' theme='_fallback' return='Actor' arguments='string sMetricsName, string sFileName'>
[02 ActorDef.lua] [02 ActorDef.lua]
</Function> </Function>
<Function name='tableshuffle' theme='_fallback' return='table' arguments='table t'>
[02 Utilities.lua] Returns a shuffled version of <code>t</code>.
</Function>
<Function name='tableslice' theme='_fallback' return='table' arguments='table t, int num'>
[02 Utilities.lua] Returns a slice of the specified table of size <code>num</code>.
</Function>
<Function name='TableStringLookup' theme='_fallback' return='table' arguments='table t, string group'> <Function name='TableStringLookup' theme='_fallback' return='table' arguments='table t, string group'>
[02 Utilities.lua] Look up each value in a table, returning a table with the resulting strings. [02 Utilities.lua] Look up each value in a table, returning a table with the resulting strings.
</Function> </Function>
@@ -308,42 +460,64 @@
<Function name='tobool' theme='_fallback' return='bool' arguments='various v'> <Function name='tobool' theme='_fallback' return='bool' arguments='various v'>
[03 ProductivityHelpers.lua] Converts a string or number to a bool. [03 ProductivityHelpers.lua] Converts a string or number to a bool.
</Function> </Function>
<Function name='tonumber' return='float' arguments='various e, int base'>
Tries to convert <code>e</code> to a number. Returns <code>nil</code> if
it can't convert the input to a number. (<code>base</code> is optional.)
</Function>
<Function name='tostring' return='string' arguments='various e'>
Converts <code>e</code> to a string.
</Function>
<Function name='ToEnumShortString' theme='_fallback' return='string' arguments='enum e'> <Function name='ToEnumShortString' theme='_fallback' return='string' arguments='enum e'>
[02 Enum.lua] Returns a string representing an enum starting from '_'. For example, passing <Link class='ENUM' function='PlayerNumber'>PlayerNumber_P1</Link> to this function will return <code>P1</code>. [02 Enum.lua] Returns a string representing an enum starting from '_'. For example, passing <Link class='ENUM' function='PlayerNumber'>PlayerNumber_P1</Link> to this function will return <code>P1</code>.
</Function> </Function>
<Function name='Trace' theme='_fallback' return='void' arguments='string sString'> <Function name='Trace' theme='_fallback' return='void' arguments='string sString'>
[00 init.lua] Alias for <Link class='lua' function='Trace' />. [00 init.lua] Alias for <Link class='lua' function='Trace' />.
</Function> </Function>
<Function name='type' return='string' arguments='various v'>
Returns the type of the object as a string. See the Lua manual for valid return values.
</Function>
<Function name='unpack' return='' arguments='table list, int i, int j'>
"Returns the elements from the given table.
This function is equivalent to <code>return list[i], list[i+1], ···, list[j]</code>"
(<code>i</code> and <code>j</code> are optional; "by default, i is 1 and j is the length of the list.")
</Function>
<Function name='URLEncode' return='string' arguments='string sInput'> <Function name='URLEncode' return='string' arguments='string sInput'>
Returns a string with characters escaped for URLs. (e.g. a space becomes '%20') Returns a string with characters escaped for URLs. (e.g. a space becomes '%20')
</Function> </Function>
<Function name='Var' theme='_fallback' return='ThreadVariable' arguments=''> <Function name='Var' theme='_fallback' return='ThreadVariable' arguments=''>
[01 base.lua] Alias for <Link class="lua" function="GetThreadVariable">lua.GetThreadVariable</Link>. [01 base.lua] Alias for <Link class="lua" function="GetThreadVariable">lua.GetThreadVariable</Link>.
</Function> </Function>
<Function name='VersionDate' return='string' arguments=''>
Returns the current version's build date.
</Function>
<Function name='VersionTime' return='string' arguments=''>
Returns the current version's build time.
</Function>
<Function name='Warn' theme='_fallback' return='void' arguments='string sString'> <Function name='Warn' theme='_fallback' return='void' arguments='string sString'>
[00 init.lua] Alias for <Link class='lua' function='Warn' />. [00 init.lua] Alias for <Link class='lua' function='Warn' />.
</Function> </Function>
<Function name='WideScale' theme='_fallback' return='float' arguments='float ar43, float ar169'> <Function name='WideScale' theme='_fallback' return='float' arguments='float ar43, float ar169'>
[04 WidescreenHelpers.lua] Depending on the screen width, scales between <code>ar43</code> (4:3; 640px) and <code>ar169</code> (16:9; 854px). [04 WidescreenHelpers.lua] Depending on the screen width, scales between <code>ar43</code> (4:3; 640px) and <code>ar169</code> (16:9; 854px).
</Function> </Function>
<Function name='wrap' theme='_fallback' return='float' arguments='float val, float n'>
[02 Utilities.lua]
</Function>
<Function name='WrapInActorFrame' theme='_fallback' return='ActorFrame' arguments='table children'> <Function name='WrapInActorFrame' theme='_fallback' return='ActorFrame' arguments='table children'>
[02 ActorDef.lua] Wraps the children in an ActorFrame. [02 ActorDef.lua] Wraps the children in an ActorFrame.
</Function> </Function>
<Function name='WriteFile' theme='_fallback' return='bool' arguments='string path, string buf'> <Function name='WriteFile' theme='_fallback' return='bool' arguments='string path, string buf'>
[04 FileUtils.lua] Writes <code>buf</code> to the file at <code>path</code>. [04 FileUtils.lua] Writes <code>buf</code> to the file at <code>path</code>.
</Function> </Function>
<Function name='WriteGamePrefToFile' theme='_fallback' return='' arguments='string name'>
[03 GamePreferences.lua]
</Function>
<Function name='WritePrefToFile' theme='_fallback' return='bool' arguments='string prefName, various value'> <Function name='WritePrefToFile' theme='_fallback' return='bool' arguments='string prefName, various value'>
[03 UserPreferences2.lua] (internal) Writes user preference <code>prefName</code> to its config file with <code>value</code> being <code>tostring</code>'d. [03 UserPreferences2.lua] (internal) Writes user preference <code>prefName</code> to its config file with <code>value</code> being <code>tostring</code>'d.
</Function> </Function>
<Function name='Year' return='int' arguments=''> <Function name='Year' return='int' arguments=''>
Returns the current year. Returns the current year.
</Function> </Function>
<!-- new sm-ssc additions here -->
<!-- default theme preferences -->
<Function name='OptionRowProTiming' theme='default' return='LuaOptionRow' arguments=''>
[03 ThemePrefs.lua] Returns a Lua option row for ProTiming.
</Function>
<Function name='UserPrefAutoSetStyle' theme='default' return='LuaOptionRow' arguments=''> <Function name='UserPrefAutoSetStyle' theme='default' return='LuaOptionRow' arguments=''>
[03 ThemePrefs.lua] Returns a Lua option row for toggling AutoSetStyle. [03 ThemePrefs.lua] Returns a Lua option row for toggling AutoSetStyle.
</Function> </Function>
@@ -367,9 +541,16 @@
<!-- Namespaces --> <!-- Namespaces -->
<Namespaces> <Namespaces>
<Namespace name='ActorUtil'> <Namespace name='ActorUtil'>
<Function name='GetFileType' return='FileType' arguments='string sPath'>
Returns the <Link class='ENUM' function='FileType' /> for the file at <code>sPath</code>.
</Function>
<Function name='IsRegisteredClass' return='bool' arguments='string sClassName'> <Function name='IsRegisteredClass' return='bool' arguments='string sClassName'>
Returns <code>true</code> if <code>sClassName</code> is a registered Class. Returns <code>true</code> if <code>sClassName</code> is a registered Class.
</Function> </Function>
<Function name='LoadAllCommandsAndSetXY' return='void' arguments='Actor a'>
Loads all commands and sets X and Y for the specified Actor.
</Function>
<Function name='ResolvePath' return='string' arguments='string sPath, int iLevel' />
</Namespace> </Namespace>
<Namespace name='Enum'> <Namespace name='Enum'>
<Description> <Description>
@@ -414,6 +595,20 @@
</Function> </Function>
</Namespace> </Namespace>
<Namespace name='lua'> <Namespace name='lua'>
<Function name='CheckType' return='bool' arguments='string sType, various v'>
Returns <code>true</code> if the type of <code>v</code> is <code>sType</code>.
</Function>
<Function name='Flush' return='void' arguments='' >
Flushes log files to disk.
</Function>
<Function name='GetThreadVariable' return='LuaThreadVariable' arguments='string s' />
<Function name='ReadFile' return='string' arguments='string sPath'>
Tries to read the file at <code>sPath</code>. If successful, it returns the file's contents.
If unsuccessful, it returns two values: <code>nil</code> and <code>"error"</code>.
</Function>
<Function name='RunWithThreadVariables' return='int' arguments='function func, table t, ...'>
Calls <code>func(...)</code> with two LuaThreadVariables set, and returns the return values of <code>func()</code>.
</Function>
<Function name='Trace' return='void' arguments='string sString'> <Function name='Trace' return='void' arguments='string sString'>
Writes <code>sString</code> to log.txt. Aliased by Writes <code>sString</code> to log.txt. Aliased by
<Link class='GLOBAL' function='Trace' />. <Link class='GLOBAL' function='Trace' />.
@@ -422,9 +617,6 @@
Writes <code>sString</code> to info.txt and log.txt as Writes <code>sString</code> to info.txt and log.txt as
a warning. Aliased by <Link class='GLOBAL' function='Warn' />. a warning. Aliased by <Link class='GLOBAL' function='Warn' />.
</Function> </Function>
<Function name='Flush' return='void' arguments='' >
Flushes log files to disk.
</Function>
</Namespace> </Namespace>
<Namespace name='RageFileUtil'> <Namespace name='RageFileUtil'>
<Function name='CreateRageFile' return='RageFile' arguments=''> <Function name='CreateRageFile' return='RageFile' arguments=''>
@@ -563,7 +755,21 @@
[02 Actor.lua] [02 Actor.lua]
</Function> </Function>
<Function name='Center' theme='_fallback' return='void' arguments=''> <Function name='Center' theme='_fallback' return='void' arguments=''>
[02 Actor.lua] Centers an Actor. [02 Actor.lua] Centers an Actor on the screen. (equivalent to <code>x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y</code>)
</Function>
<Function name='CenterX' theme='_fallback' return='void' arguments=''>
[03 ProductivityHelpers.lua] Centers an Actor on the X axis. (equivalent to <code>x,SCREEN_CENTER_X</code>)
</Function>
<Function name='CenterY' theme='_fallback' return='void' arguments=''>
[03 ProductivityHelpers.lua] Centers an Actor on the y axis. (equivalent to <code>y,SCREEN_CENTER_Y</code>)
</Function>
<Function name='clearzbuffer' return='void' arguments='bool bClear'>
Determines if the z-buffer should be cleared or not.
</Function>
<Function name='compound' theme='_fallback' return='void' arguments='float length, string tweens'>
[02 Actor.lua] Combines multiple interpolators for complex tweens. <code>tweens</code>
can either be a string like <code>"linear,0.25,accelerate,0.75"</code> or
a table with tween information <code>{ {Type="linear", Percent=0.25, Bezier=nil}, {Type="accelerate", Percent=0.75, Bezier=nil} }</code>
</Function> </Function>
<Function name='cropbottom' return='void' arguments='float percent'> <Function name='cropbottom' return='void' arguments='float percent'>
Crops <code>percent</code> of the Actor from the bottom, where <code>percent</code> is in the range 0..1. Crops <code>percent</code> of the Actor from the bottom, where <code>percent</code> is in the range 0..1.
@@ -856,6 +1062,9 @@
<Function name='stopeffect' return='void' arguments=''> <Function name='stopeffect' return='void' arguments=''>
Stops any effect the Actor has. Stops any effect the Actor has.
</Function> </Function>
<Function name='stoptweening' return='void' arguments=''>
Stops any tweening.
</Function>
<Function name='stretchto' return='void' arguments='float x1, float y1, float x2, float y2'> <Function name='stretchto' return='void' arguments='float x1, float y1, float x2, float y2'>
Stretches the Actor to a rectangle of a specific size. Stretches the Actor to a rectangle of a specific size.
</Function> </Function>
@@ -880,6 +1089,12 @@
<Function name='z' return='void' arguments='float zPos'> <Function name='z' return='void' arguments='float zPos'>
Set the z position of the Actor to <code>zPos</code>. Set the z position of the Actor to <code>zPos</code>.
</Function> </Function>
<Function name='zbias' return='void' arguments='float fBias'>
Sets the z bias to <code>fBias</code>.
</Function>
<Function name='zbuffer' return='void' arguments='bool bUse'>
Enables/disables z-buffer depending on <code>bUse</code>.
</Function>
<Function name='zoom' return='void' arguments='float zoom'> <Function name='zoom' return='void' arguments='float zoom'>
Zooms the Actor to <code>zoom</code> scale. Zooms the Actor to <code>zoom</code> scale.
</Function> </Function>
@@ -901,19 +1116,19 @@
<Function name='zoomz' return='void' arguments='float zoom'> <Function name='zoomz' return='void' arguments='float zoom'>
Zooms the Actor to <code>zoom</code> scale on the Z axis. Zooms the Actor to <code>zoom</code> scale on the Z axis.
</Function> </Function>
<Function name='ztest' return='void' arguments='bool bTest'>
Sets the z testing mode to write on pass if <code>true</code>, turns it off if <code>false</code>
</Function>
<Function name='ztestmode' return='void' arguments='ZTestMode testMode'>
Sets the z testing mode to <code>testMode</code>.
</Function>
<Function name='zwrite' return='void' arguments='bool bWrite'>
Sets z writing to <code>true</code> or <code>false</code> based on <code>bWrite</code>.
</Function>
<!-- addons from scripts that come with sm-ssc (non-compat) --> <!-- addons from scripts that come with sm-ssc (non-compat) -->
<Function name='bezier' theme='_fallback' return='void' arguments=''> <Function name='bezier' theme='_fallback' return='void' arguments=''>
[02 Actor.lua] [02 Actor.lua]
</Function> </Function>
<Function name='Center' theme='_fallback' return='void' arguments=''>
[02 Actor.lua] Centers an Actor on the screen. (equivalent to <code>x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y</code>)
</Function>
<Function name='CenterX' theme='_fallback' return='void' arguments=''>
[03 ProductivityHelpers.lua] Centers an Actor on the X axis. (equivalent to <code>x,SCREEN_CENTER_X</code>)
</Function>
<Function name='CenterY' theme='_fallback' return='void' arguments=''>
[03 ProductivityHelpers.lua] Centers an Actor on the y axis. (equivalent to <code>y,SCREEN_CENTER_Y</code>)
</Function>
<Function name='FullScreen' theme='_fallback' return='void' arguments=''> <Function name='FullScreen' theme='_fallback' return='void' arguments=''>
[02 Actor.lua] Stretches an Actor to cover the screen. (equivalent to <code>stretchto,0,0,SCREEN_WIDTH,SCREEN_HEIGHT</code>) [02 Actor.lua] Stretches an Actor to cover the screen. (equivalent to <code>stretchto,0,0,SCREEN_WIDTH,SCREEN_HEIGHT</code>)
</Function> </Function>
@@ -1166,7 +1381,7 @@
Loads the card image from the specified Character. Loads the card image from the specified Character.
</Function> </Function>
<Function name='LoadFromCachedBanner' return='void' arguments='string sPath'> <Function name='LoadFromCachedBanner' return='void' arguments='string sPath'>
Loads the banner from the cache based on <code>sPath</code> (typically <Link class='Song' function='GetBannerPath' /> or <Link class='Course' function='GetBannerPath' />).
</Function> </Function>
<Function name='LoadFromCourse' return='void' arguments='Course c'> <Function name='LoadFromCourse' return='void' arguments='Course c'>
Loads a Banner from a specified Course. Loads a Banner from a specified Course.
@@ -1325,6 +1540,9 @@
<Function name='GetRandomCharacter' return='Character' arguments=''> <Function name='GetRandomCharacter' return='Character' arguments=''>
Returns a random character. Returns a random character.
</Function> </Function>
<Function name='GetCharacterCount' return='int' arguments=''>
Returns the number of characters available.
</Function>
</Class> </Class>
<Class name='ComboGraph'> <Class name='ComboGraph'>
<Function name='Load' return='void' arguments='string sMetricsGroup'> <Function name='Load' return='void' arguments='string sMetricsGroup'>
@@ -1455,6 +1673,9 @@
<Function name='MD5String' return='string' arguments='string s'> <Function name='MD5String' return='string' arguments='string s'>
Returns the MD5 hash for <code>s</code>. Returns the MD5 hash for <code>s</code>.
</Function> </Function>
<Function name='SHA1File' return='string' arguments='string sPath'>
Returns the SHA-1 hash for the file at <code>sPath</code>.
</Function>
<Function name='SHA1String' return='string' arguments='string s'> <Function name='SHA1String' return='string' arguments='string s'>
Returns the SHA-1 hash for <code>s</code>. Returns the SHA-1 hash for <code>s</code>.
</Function> </Function>
@@ -2007,6 +2228,9 @@
</Function> </Function>
</Class> </Class>
<Class name='LifeMeterBattery'> <Class name='LifeMeterBattery'>
<Function name='ChangeLives' return='void' arguments='int iNumLives'>
Changes the player's life by <code>iNumLives</code>. (Negative values subtract lives.)
</Function>
<Function name='GetLivesLeft' return='int' arguments=''> <Function name='GetLivesLeft' return='int' arguments=''>
Returns the number of lives remaining. Returns the number of lives remaining.
</Function> </Function>
@@ -2707,7 +2931,9 @@
</Function> </Function>
</Class> </Class>
<Class name='ProfileManager'> <Class name='ProfileManager'>
<Function name='GetLocalProfile' return='Profile' arguments='string sProfileID' /> <Function name='GetLocalProfile' return='Profile' arguments='string sProfileID'>
Returns the Profile for the specified profile ID.
</Function>
<Function name='GetLocalProfileFromIndex' return='Profile' arguments='int iIndex' /> <Function name='GetLocalProfileFromIndex' return='Profile' arguments='int iIndex' />
<Function name='GetLocalProfileIDFromIndex' return='string' arguments='int iIndex' /> <Function name='GetLocalProfileIDFromIndex' return='string' arguments='int iIndex' />
<Function name='GetLocalProfileIndexFromID' return='int' arguments='string sProfileID' /> <Function name='GetLocalProfileIndexFromID' return='int' arguments='string sProfileID' />
@@ -2729,6 +2955,9 @@
<Function name='IsSongNew' return='bool' arguments='Song s'> <Function name='IsSongNew' return='bool' arguments='Song s'>
Returns <code>true</code> if Song <code>s</code> has never been played before (according to the machine profile). Returns <code>true</code> if Song <code>s</code> has never been played before (according to the machine profile).
</Function> </Function>
<Function name='ProfileWasLoadedFromMemoryCard' return='bool' arguments='PlayerNumber pn'>
Returns <code>true</code> if <code>pn</code>'s Profile was loaded from a memory card.
</Function>
<Function name='LastLoadWasFromLastGood' return='bool' arguments='PlayerNumber pn'> <Function name='LastLoadWasFromLastGood' return='bool' arguments='PlayerNumber pn'>
Returns <code>true</code> if the last load of player <code>pn</code>'s profile was a LastGood copy of the profile. Returns <code>true</code> if the last load of player <code>pn</code>'s profile was a LastGood copy of the profile.
</Function> </Function>
@@ -2864,12 +3093,21 @@
<Function name='GetPrevScreenName' return='string' arguments=''> <Function name='GetPrevScreenName' return='string' arguments=''>
Returns the name of the previous Screen. Returns the name of the previous Screen.
</Function> </Function>
<Function name='GetScreenType' return='ScreenType' arguments=''>
Returns the ScreenType for this Screen.
</Function>
<Function name='lockinput' return='void' arguments='float f'> <Function name='lockinput' return='void' arguments='float f'>
Locks input for <code>f</code> seconds. Locks input for <code>f</code> seconds.
</Function> </Function>
<Function name='Metric' theme='_fallback' return='string' arguments='string sName'>
[02 Other.lua] Gets a metric from the current Screen.
</Function>
<Function name='PostScreenMessage' return='void' arguments='string sScreenMsg'> <Function name='PostScreenMessage' return='void' arguments='string sScreenMsg'>
Posts a message with the text <code>sScreenMsg</code> to the Screen. Posts a message with the text <code>sScreenMsg</code> to the Screen.
</Function> </Function>
<Function name='String' theme='_fallback' return='string' arguments='string sName'>
[02 Other.lua] Gets a string from the current Screen in the current language.
</Function>
</Class> </Class>
<Class name='ScreenEdit'> <Class name='ScreenEdit'>
<Function name='GetEditState' return='EditState' arguments=''> <Function name='GetEditState' return='EditState' arguments=''>
@@ -3340,6 +3578,9 @@
<Function name='LoadBanner' return='void' arguments='string sPath'> <Function name='LoadBanner' return='void' arguments='string sPath'>
Load the song banner texture at <code>sPath</code>. Load the song banner texture at <code>sPath</code>.
</Function> </Function>
<Function name='LoadFromCurrentSongBackground' theme='_fallback' return='void' arguments=''>
[02 Sprite.lua] Loads the background from the current Song or the first Trail entry.
</Function>
<Function name='LoadFromSongBackground' theme='_fallback' return='void' arguments='Song song'> <Function name='LoadFromSongBackground' theme='_fallback' return='void' arguments='Song song'>
[02 Sprite.lua] Load the texture for <code>song</code>'s background. [02 Sprite.lua] Load the texture for <code>song</code>'s background.
</Function> </Function>
@@ -3352,6 +3593,9 @@
<Function name='SetEffectMode' return='void' arguments='EffectMode mode'> <Function name='SetEffectMode' return='void' arguments='EffectMode mode'>
Set the <Link class='ENUM' function='EffectMode' /> to <code>mode</code>. Set the <Link class='ENUM' function='EffectMode' /> to <code>mode</code>.
</Function> </Function>
<Function name='SetSecondsIntoAnimation' return='void' arguments='float fSeconds'>
Sets the number of seconds into the animation to <code>fSeconds</code>.
</Function>
<Function name='SetTexture' return='void' arguments='RageTexture texture'> <Function name='SetTexture' return='void' arguments='RageTexture texture'>
Set the texture to <code>texture</code>. Set the texture to <code>texture</code>.
</Function> </Function>
@@ -3797,7 +4041,9 @@
<Function name='GetUnlockEntryIndexToCelebrate' return='int' arguments=''> <Function name='GetUnlockEntryIndexToCelebrate' return='int' arguments=''>
Returns the UnlockEntry index to celebrate. Returns the UnlockEntry index to celebrate.
</Function> </Function>
<Function name='PreferUnlockEntryID' return='void' arguments='string sUnlockEntryID' /> <Function name='PreferUnlockEntryID' return='void' arguments='string sUnlockEntryID'>
Sets the preferred Song/Course to the specified <code>sUnlockEntryID</code>
</Function>
<Function name='UnlockEntryID' return='void' arguments='string sUnlockEntryID'> <Function name='UnlockEntryID' return='void' arguments='string sUnlockEntryID'>
Unlocks an entry by ID. Unlocks an entry by ID.
</Function> </Function>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

+2 -2
View File
@@ -69,8 +69,8 @@ LetGoCommand=blend,'BlendMode_Add';
HeldCommand=blend,'BlendMode_Add';diffuse,1.0,1.0,0.3,0.875;zoom,1;linear,0.06;zoom,1.1;linear,0.06;diffusealpha,0 HeldCommand=blend,'BlendMode_Add';diffuse,1.0,1.0,0.3,0.875;zoom,1;linear,0.06;zoom,1.1;linear,0.06;diffusealpha,0
[HoldGhostArrow] [HoldGhostArrow]
HoldingOnCommand=visible,true HoldingOnCommand=blend,'BlendMode_Add';pulse;effectmagnitude,1,1.125,1;effectperiod,0.05;effectclock,'beatnooffset';visible,true
HoldingOffCommand=visible,false HoldingOffCommand=blend,'BlendMode_Add';stopeffect;visible,false
[ReceptorArrow] [ReceptorArrow]
W3Command=stoptweening;zoom,0.85;linear,0.12;zoom,1 W3Command=stoptweening;zoom,0.85;linear,0.12;zoom,1
+2 -3
View File
@@ -15,10 +15,9 @@ return Def.ActorFrame {
--tap --tap
NOTESKIN:LoadActor(Var "Button", "Ready Receptor")..{ NOTESKIN:LoadActor(Var "Button", "Ready Receptor")..{
Name="Tap"; Name="Tap";
Frames = { { Frame = 2 } }; --Frames = { { Frame = 2 ; Delay = 1 } };
TapCommand=cmd(finishtweening;diffusealpha,1;zoom,1;linear,0.2;diffusealpha,0;zoom,1.2); TapCommand=cmd(finishtweening;diffusealpha,1;zoom,1;linear,0.2;diffusealpha,0;zoom,1.2);
InitCommand=cmd(pause;setstate,2;playcommand,"Tap");
InitCommand=cmd(playcommand,"Tap");
HeldCommand=cmd(playcommand,"Tap"); HeldCommand=cmd(playcommand,"Tap");
ColumnJudgmentMessageCommand=cmd(playcommand,"Tap"); ColumnJudgmentMessageCommand=cmd(playcommand,"Tap");
--TapNoneCommand=cmd(playcommand,"Tap"); --TapNoneCommand=cmd(playcommand,"Tap");
+1 -1
View File
@@ -7571,7 +7571,7 @@ M300
#METER:21; #METER:21;
#RADARVALUES:1.000,1.000,0.620,0.488,1.000,1006.000,80.000,63.000,0.000,0.000,0.000,0.000,0.000,1.000,1.000,0.620,0.488,1.000,1006.000,80.000,63.000,0.000,0.000,0.000,0.000,0.000; #RADARVALUES:1.000,1.000,0.620,0.488,1.000,1006.000,80.000,63.000,0.000,0.000,0.000,0.000,0.000,1.000,1.000,0.620,0.488,1.000,1006.000,80.000,63.000,0.000,0.000,0.000,0.000,0.000;
#CREDIT:Vin.il; #CREDIT:Vin.il;
#OFFSET:-0.084000; #OFFSET:-0.125000;
#BPMS:0.000000=181.699997 #BPMS:0.000000=181.699997
,44.000000=363.399994 ,44.000000=363.399994
,47.000000=726.799988 ,47.000000=726.799988
+8
View File
@@ -0,0 +1,8 @@
[How to Install Songs]
Songs are laid out based on the group that they are in.
Songs\ : root folder
StepMania 5\ : group folder
MechaTribe Assault\ : song/simfile folder
*.png, *.mp3/*.ogg, *.sm/*.ssc/etc files
@@ -25,7 +25,8 @@ local ssc = {
} }
local sm_ssc = { local sm_ssc = {
"Jason Felds (wolfman2000)", "Jason Felds (wolfman2000)", -- Timing Segments, Split Timing, optimization
"Thai Pangsakulyanont (theDtTvB)", -- BMS, Split Timing, optimization
"Alberto Ramos (Daisuke Master)", "Alberto Ramos (Daisuke Master)",
"Jack Walstrom (FSX)", "Jack Walstrom (FSX)",
} }
@@ -39,9 +40,10 @@ local stepmania = {
local contrib = { local contrib = {
"Aldo Fregoso (Aldo_MX)", -- delays "Aldo Fregoso (Aldo_MX)", -- delays
"Chris Eldridge (kurisu)", -- dance-threepanel
"cerbo", "cerbo",
"cesarmades", -- pump/cmd* noteskins "cesarmades", -- pump/cmd* noteskins
"Chris Eldridge (kurisu)", -- dance-threepanel
"Christophe Goulet-LeBlanc (Kommisar)",
"corec", -- various fixes "corec", -- various fixes
"galopin", -- piu PlayStation2 usb mat support "galopin", -- piu PlayStation2 usb mat support
"gholms", -- automake 1.11 support "gholms", -- automake 1.11 support
@@ -49,9 +51,8 @@ local contrib = {
"Kaox", -- pump/default noteskin "Kaox", -- pump/default noteskin
"NitroX72", -- pump/frame noteskin "NitroX72", -- pump/frame noteskin
"sy567", -- beginner helper fix "sy567", -- beginner helper fix
"Thai Pangsakulyanont (theDtTvB)",
"v1toko", -- x-mode from StepNXA "v1toko", -- x-mode from StepNXA
"Christophe Goulet-LeBlanc (Kommisar)", "waiei", -- custom scoring fixes + Hybrid scoring
} }
local thanks = { local thanks = {
@@ -71,7 +72,7 @@ local thanks = {
local shoutout = { local shoutout = {
"The Lua team", -- lua project lead or some shit. super nerdy but oh hell. "The Lua team", -- lua project lead or some shit. super nerdy but oh hell.
"Mojang", -- minecraft forever -freem "Mojang AB", -- minecraft forever -freem
"NAKET Coder", "NAKET Coder",
"Ciera Boyd", -- you bet your ass I'm putting my girlfriend in the credits "Ciera Boyd", -- you bet your ass I'm putting my girlfriend in the credits
--Image(), -- we should have some logos probably to look super pro --Image(), -- we should have some logos probably to look super pro
Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 22 KiB

+4 -1
View File
@@ -816,7 +816,7 @@ CoinsPerCredit=Coins&nbsp;Per Credit
Connection=Connection Connection=Connection
Convert pause to beats=Convert stop to beats Convert pause to beats=Convert stop to beats
Convert delay to beats=Convert delay to beats Convert delay to beats=Convert delay to beats
Convert selection to pause=Convert selection to pause Convert selection to pause=Convert selection to stop
Convert selection to delay=Convert selection to delay Convert selection to delay=Convert selection to delay
Convert selection to warp=Convert selection to Warp Segment Convert selection to warp=Convert selection to Warp Segment
Convert selection to fake=Convert selection to Fake Segment Convert selection to fake=Convert selection to Fake Segment
@@ -914,6 +914,7 @@ Insert=Insert
Insert Credit=Insert Credit Insert Credit=Insert Credit
Insert beat and shift down=Insert beat and shift down Insert beat and shift down=Insert beat and shift down
Insert Entry=Insert Entry Insert Entry=Insert Entry
Invert notes' player=Invert player notes (routine only)
Jumps=Jumps Jumps=Jumps
Key Joy Mappings=Config Key/Joy Mappings Key Joy Mappings=Config Key/Joy Mappings
Language=Language Language=Language
@@ -931,6 +932,8 @@ MenuTimer=Menu Timer
Meter=Meter Meter=Meter
Min BPM=Min Specified BPM Min BPM=Min Specified BPM
Mines=Mines Mines=Mines
Mirror Player 1 to 2=Mirror P1's notes to P2 (routine only)
Mirror Player 2 to 1=Mirror P2's notes to P1 (routine only)
MoveRandomToEnd=Random At&nbsp;End MoveRandomToEnd=Random At&nbsp;End
More Options=More Options More Options=More Options
MovieColorDepth=Movie Color MovieColorDepth=Movie Color
+15 -7
View File
@@ -17,15 +17,25 @@ function SetFail()
local sFail = ""; local sFail = "";
if GetGamePref("DefaultFail") then if GetGamePref("DefaultFail") then
sFail = string.format("fail%s", string.lower( GetGamePref("DefaultFail") )); sFail = string.format("Fail%s", GetGamePref("DefaultFail"));
else else
sFail = "failoff"; sFail = "FailOff";
end end
sFail = sFail .. ",failimmediate,suddendeath"; sFail = tostring(sFail);
SCREENMAN:SystemMessage( 'NEW FAIL IS: ' .. tostring(sFail) ); -- SCREENMAN:SystemMessage( 'NEW FAIL IS: ' .. tostring(sFail) );
GAMESTATE:SetSongOptions( "ModsLevel_Song", sFail ); for pn in ivalues(GAMESTATE:GetHumanPlayers()) do
-- GAMESTATE:ApplyGameCommand( "stagemod,FailImmediateContinue", pn );
-- GAMESTATE:GetPlayerState(pn):SetPlayerOptions( "ModsLevel_Song", 'mod,FailImmediateContinue' );
MESSAGEMAN:Broadcast( "PlayerOptionsChanged", {PlayerNumber = pn} );
end
-- GAMESTATE:SetSongOptions( "ModsLevel_Preferred", 'mod,FailImmediateContinue' );
-- GAMESTATE:SetSongOptions( "ModsLevel_Stage", 'mod,FailImmediateContinue' );
-- GAMESTATE:SetSongOptions( "ModsLevel_Song",'mod,FailImmediateContinue' );
GAMESTATE:ApplyGameCommand( "mod," .. sFail);
-- GAMESTATE:ApplyGameCommand( "stagemod,FailImmediateContinue");
MESSAGEMAN:Broadcast( "SongOptionsChanged" ); MESSAGEMAN:Broadcast( "SongOptionsChanged" );
end end
@@ -55,8 +65,6 @@ function ScreenSelectMusic:setupmusicstagemods()
so = THEME:GetMetric("SongManager","ExtraStageStageModifiers"); so = THEME:GetMetric("SongManager","ExtraStageStageModifiers");
end end
so = so .. "," .. sFail;
local difficulty = steps:GetDifficulty() local difficulty = steps:GetDifficulty()
local Reverse = PlayerNumber:Reverse() local Reverse = PlayerNumber:Reverse()
+16 -88
View File
@@ -28,7 +28,7 @@ ScreenHeight=480
AutoSetStyle=GetUserPrefB("UserPrefAutoSetStyle") AutoSetStyle=GetUserPrefB("UserPrefAutoSetStyle")
# Default modifiers and noteskin. # Default modifiers and noteskin.
DefaultModifiers="default,1.5x" DefaultModifiers="1.5x"
DefaultNoteSkinName="default" DefaultNoteSkinName="default"
# Difficulties to show. Useful for custom games where you want to hide these. # Difficulties to show. Useful for custom games where you want to hide these.
@@ -200,8 +200,8 @@ DrunkOffsetFrequency=10
DrunkArrowMagnitude=0.5 DrunkArrowMagnitude=0.5
BeatOffsetHeight=15 BeatOffsetHeight=15
BeatPIHeight=2 BeatPIHeight=2
MiniPercentBase=0.5 TinyPercentBase=0.5
MiniPercentGate=1 TinyPercentGate=1
DizzyHoldHeads=false DizzyHoldHeads=false
QuantizeArrowYPosition=false QuantizeArrowYPosition=false
@@ -413,73 +413,6 @@ SortLevel5Color=color("0,1,0,1")
# Custom system that lets you rename certain classes of difficulties to # Custom system that lets you rename certain classes of difficulties to
# something else. Mostly for custom games and game emulation, PIU for example. # something else. Mostly for custom games and game emulation, PIU for example.
# The names of which
Names="PumpHard,PumpFreestyle,PumpNightmare,PumpHalfDouble,PumpRoutine"
# Names="DanceCoupleBeginner,DanceCoupleEasy,DanceCoupleMedium,DanceCoupleHard,DanceCoupleExpert,PumpHard"
# That get remapped to
DanceCoupleBeginnerStepsType="StepsType_Dance_Couple"
DanceCoupleBeginnerDifficulty="Difficulty_Beginner"
DanceCoupleBeginnerCourseType=nil
DanceCoupleBeginnerString="Beginner"
#--#
DanceCoupleEasyStepsType="StepsType_Dance_Couple"
DanceCoupleEasyDifficulty="Difficulty_Easy"
DanceCoupleEasyCourseType=nil
DanceCoupleEasyString="Easy"
#--#
DanceCoupleMediumStepsType="StepsType_Dance_Couple"
DanceCoupleMediumDifficulty="Difficulty_Medium"
DanceCoupleMediumCourseType=nil
DanceCoupleMediumString="Medium"
#--#
DanceCoupleHardStepsType="StepsType_Dance_Couple"
DanceCoupleHardDifficulty="Difficulty_Hard"
DanceCoupleHardCourseType=nil
DanceCoupleHardString="Hard"
#--#
DanceCoupleExpertStepsType="StepsType_Dance_Couple"
DanceCoupleExpertDifficulty="Difficulty_Expert"
DanceCoupleExpertCourseType=nil
DanceCoupleExpertString="Expert"
#===#
PumpHardStepsType="StepsType_Pump_Single"
PumpHardDifficulty="Difficulty_Hard"
PumpHardCourseType=nil
PumpHardString="Crazy"
#--#
PumpFreestyleStepsType="StepsType_Pump_Double"
PumpFreestyleDifficulty="Difficulty_Medium"
PumpFreestyleCourseType=nil
PumpFreestyleString="Freestyle"
#--#
PumpNightmareStepsType="StepsType_Pump_Double"
PumpNightmareDifficulty="Difficulty_Hard"
PumpNightmareCourseType=nil
PumpNightmareString="Nightmare"
#--#
PumpHalfDoubleStepsType="StepsType_Pump_Halfdouble"
PumpHalfDoubleDifficulty="Difficulty_Medium"
PumpHalfDoubleCourseType=nil
PumpHalfDoubleString="HalfDouble"
#--#
PumpRoutineStepsType="StepsType_Pump_Routine"
PumpRoutineDifficulty="Difficulty_Medium"
PumpRoutineCourseType=nil
PumpRoutineString="Routine"
#
# Difficulty_Beginner-StepsType_Pump_Single=Easy
# Difficulty_Easy-StepsType_Pump_Single=Normal
# Difficulty_Medium-StepsType_Pump_Single=Hard
# Difficulty_Hard-StepsType_Pump_Single=Crazy
# Difficulty_Medium-StepsType_Pump_Halfdouble=Half-Double
# Difficulty_Medium-StepsType_Pump_Double=Freestyle
# Difficulty_Hard-StepsType_Pump_Double=Nightmare
# Difficulty_Edit-StepsType_Pump_Single=Edit
# Difficulty_Edit-StepsType_Pump_Halfdouble=Edit
# Difficulty_Edit-StepsType_Pump_Double=Edit
# Course=Progressive
[DifficultyList] [DifficultyList]
# A list that shows difficulties in a song. # A list that shows difficulties in a song.
CapitalizeDifficultyNames=false CapitalizeDifficultyNames=false
@@ -2085,7 +2018,7 @@ ForceTimer=true
TimerMetricsGroup="MenuTimerNoSound" TimerMetricsGroup="MenuTimerNoSound"
TimerSeconds=5 TimerSeconds=5
# #
# ScreenOnCommand=%SetFail() ScreenBeginCommand=%SetFail
# #
[ScreenOptions] [ScreenOptions]
Fallback="ScreenWithMenuElements" Fallback="ScreenWithMenuElements"
@@ -2199,22 +2132,23 @@ Accel,5="mod,boomerang;name,Boomerang"
# Accel,5="mod,expand;name,Expand" # Accel,5="mod,expand;name,Expand"
# Accel,6="mod,boomerang;name,Boomerang" # Accel,6="mod,boomerang;name,Boomerang"
Effect="14;selectmultiple" Effect="15;selectmultiple"
EffectDefault="mod,no drunk,no dizzy,,no twirl,no roll,no confusion,no mini,no tiny,no flip,no invert,no tornado,no tipsy,no bumpy,no beat,no xmode" EffectDefault="mod,no drunk,no dizzy,,no twirl,no roll,no confusion,no mini,no tiny,no flip,no invert,no tornado,no tipsy,no bumpy,no beat,no xmode"
Effect,1="mod,drunk;name,Drunk" Effect,1="mod,drunk;name,Drunk"
Effect,2="mod,dizzy;name,Dizzy" Effect,2="mod,dizzy;name,Dizzy"
Effect,3="mod,twirl;name,Twirl" Effect,3="mod,twirl;name,Twirl"
Effect,4="mod,roll;name,Roll" Effect,4="mod,roll;name,Roll"
Effect,5="mod,confusion;name,Confusion" Effect,5="mod,confusion;name,Confusion"
Effect,6="mod,tiny;name,Tiny" Effect,6="mod,mini;name,Mini"
Effect,7="mod,-100% mini;name,Big" Effect,7="mod,tiny;name,Tiny"
Effect,8="mod,flip;name,Flip" Effect,8="mod,-100% mini;name,Big"
Effect,9="mod,invert;name,Invert" Effect,9="mod,flip;name,Flip"
Effect,10="mod,tornado;name,Tornado" Effect,10="mod,invert;name,Invert"
Effect,11="mod,tipsy;name,Tipsy" Effect,11="mod,tornado;name,Tornado"
Effect,12="mod,bumpy;name,Bumpy" Effect,12="mod,tipsy;name,Tipsy"
Effect,13="mod,beat;name,Beat" Effect,13="mod,bumpy;name,Bumpy"
Effect,14="mod,45% xmode;name,XMode" Effect,14="mod,beat;name,Beat"
Effect,15="mod,45% xmode;name,XMode"
EffectsReceptor="selectmultiple" EffectsReceptor="selectmultiple"
EffectsReceptorDefault="" EffectsReceptorDefault=""
@@ -2388,12 +2322,6 @@ Persp,3="mod,space;name,Space"
Persp,4="mod,hallway;name,Hallway" Persp,4="mod,hallway;name,Hallway"
Persp,5="mod,distant;name,Distant" Persp,5="mod,distant;name,Distant"
ScoreDisplay="3"
ScoreDisplayDefault="mod,addscore"
ScoreDisplay,1="mod,addscore;name,Add"
ScoreDisplay,2="mod,subtractscore;name,Subtract"
ScoreDisplay,3="mod,averagescore;name,Average"
# Song options # Song options
# LifeType="3;together" # LifeType="3;together"
LifeType=(GAMESTATE:IsCourseMode() and 3 or 2)..";together" LifeType=(GAMESTATE:IsCourseMode() and 3 or 2)..";together"
@@ -3659,7 +3587,7 @@ SelectionBeatBeginFormat="%s:\n %.6f"
SelectionBeatUnfinishedFormat=" ...\n" SelectionBeatUnfinishedFormat=" ...\n"
SelectionBeatEndFormat="-%.6f\n" SelectionBeatEndFormat="-%.6f\n"
DifficultyFormat="%s:\n %s\n" DifficultyFormat="%s:\n %s\n"
RoutinePlayerFormat="%s:\n %d\n" RoutinePlayerFormat="%s: %d\n"
DescriptionFormat="%s:\n %s\n" DescriptionFormat="%s:\n %s\n"
StepAuthorFormat="%s:\n %s\n" StepAuthorFormat="%s:\n %s\n"
ChartStyleFormat="%s:\n %s\n" ChartStyleFormat="%s:\n %s\n"
@@ -40,9 +40,10 @@ local stepmania = {
local contrib = { local contrib = {
"Aldo Fregoso (Aldo_MX)", -- delays "Aldo Fregoso (Aldo_MX)", -- delays
"Chris Eldridge (kurisu)", -- dance-threepanel
"cerbo", "cerbo",
"cesarmades", -- pump/cmd* noteskins "cesarmades", -- pump/cmd* noteskins
"Chris Eldridge (kurisu)", -- dance-threepanel
"Christophe Goulet-LeBlanc (Kommisar)",
"corec", -- various fixes "corec", -- various fixes
"galopin", -- piu PlayStation2 usb mat support "galopin", -- piu PlayStation2 usb mat support
"gholms", -- automake 1.11 support "gholms", -- automake 1.11 support
@@ -50,9 +51,8 @@ local contrib = {
"Kaox", -- pump/default noteskin "Kaox", -- pump/default noteskin
"NitroX72", -- pump/frame noteskin "NitroX72", -- pump/frame noteskin
"sy567", -- beginner helper fix "sy567", -- beginner helper fix
"Thai Pangsakulyanont (theDtTvB)",
"v1toko", -- x-mode from StepNXA "v1toko", -- x-mode from StepNXA
"Christophe Goulet-LeBlanc (Kommisar)", "waiei", -- custom scoring fixes + Hybrid scoring
} }
local thanks = { local thanks = {
@@ -72,7 +72,7 @@ local thanks = {
local shoutout = { local shoutout = {
"The Lua team", -- lua project lead or some shit. super nerdy but oh hell. "The Lua team", -- lua project lead or some shit. super nerdy but oh hell.
"Mojang", -- minecraft forever -freem "Mojang AB", -- minecraft forever -freem
"Wolfire Games", -- piles of inspiration "Wolfire Games", -- piles of inspiration
"NAKET Coder", "NAKET Coder",
"Ciera Boyd", -- you bet your ass I'm putting my girlfriend in the credits "Ciera Boyd", -- you bet your ass I'm putting my girlfriend in the credits
@@ -55,14 +55,14 @@ local function CreateStats( pnPlayer )
return t return t
end; end;
-- xxx: this only currently works for player 1. -aj
local t = Def.ActorFrame {}; local t = Def.ActorFrame {};
GAMESTATE:IsPlayerEnabled(PLAYER_1)
t[#t+1] = Def.ActorFrame { t[#t+1] = Def.ActorFrame {
InitCommand=cmd(x,WideScale(math.floor(SCREEN_CENTER_X*0.3)-8,math.floor(SCREEN_CENTER_X*0.5)-8);y,SCREEN_CENTER_Y-34); InitCommand=cmd(hide_if,not GAMESTATE:IsPlayerEnabled(PLAYER_1);x,WideScale(math.floor(SCREEN_CENTER_X*0.3)-8,math.floor(SCREEN_CENTER_X*0.5)-8);y,SCREEN_CENTER_Y-34);
CreateStats( PLAYER_1 ); CreateStats( PLAYER_1 );
}; };
t[#t+1] = Def.ActorFrame { t[#t+1] = Def.ActorFrame {
InitCommand=cmd(x,WideScale(math.floor(SCREEN_CENTER_X*1.7)+8,math.floor(SCREEN_CENTER_X*1.5)+8);y,SCREEN_CENTER_Y-34); InitCommand=cmd(hide_if,not GAMESTATE:IsPlayerEnabled(PLAYER_2);x,WideScale(math.floor(SCREEN_CENTER_X*1.7)+8,math.floor(SCREEN_CENTER_X*1.5)+8);y,SCREEN_CENTER_Y-34);
CreateStats( PLAYER_2 ); CreateStats( PLAYER_2 );
}; };
return t return t
@@ -1 +1 @@
_blank _CombinedLifeMeterTug separator
@@ -38,6 +38,10 @@ else
local stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1) local stepsP1 = GAMESTATE:GetCurrentSteps(PLAYER_1)
local stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2) local stepsP2 = GAMESTATE:GetCurrentSteps(PLAYER_2)
if not stepsP1 or not stepsP2 then
return displaySingle
end
local stP1 = stepsP1:GetStepsType() local stP1 = stepsP1:GetStepsType()
local stP2 = stepsP2:GetStepsType() local stP2 = stepsP2:GetStepsType()
@@ -0,0 +1,10 @@
return LoadFont("Common Normal") .. {
Text="Exit";
InitCommand=cmd(x,SCREEN_CENTER_X;zoom,0.75;shadowlength,0;diffuse,color("#880000");NoStroke);
OnCommand=cmd(diffusealpha,0;decelerate,0.5;diffusealpha,1);
OffCommand=cmd(stoptweening;accelerate,0.3;diffusealpha,0;queuecommand,"Hide");
HideCommand=cmd(hidden,true);
GainFocusCommand=cmd(diffuseshift;effectcolor1,color("#FF2222");effectcolor2,color("#880000"););
LoseFocusCommand=cmd(stopeffect);
};
@@ -1 +0,0 @@
_blank
+17 -10
View File
@@ -231,9 +231,9 @@ function UserPrefShowLotsaOptions()
end end
function GetDefaultOptionLines() function GetDefaultOptionLines()
local LineSets = { local LineSets = { -- none of these include characters yet.
"1,8,14,2,3,4,5,6,R,7,9,10,11,12,13,16,17,18", -- All "1,8,14,2,3,4,5,6,R,7,9,10,11,12,13,16,17", -- All
"1,8,14,2,7,13,16,17,18", -- DDR Essentials ( no turns, fx ) "1,8,14,2,7,13,16,17", -- DDR Essentials ( no turns, fx )
}; };
local function IsExtra() local function IsExtra()
if GAMESTATE:IsExtraStage() or GAMESTATE:IsExtraStage2() then if GAMESTATE:IsExtraStage() or GAMESTATE:IsExtraStage2() then
@@ -242,15 +242,22 @@ function GetDefaultOptionLines()
return false return false
end end
end end
local function CheckCharacters(mods)
if CHARMAN:GetCharacterCount() > 0 then
return mods .. ",18"; --TODO: Better line name.
end
return mods;
end
modLines = LineSets[2];
if not IsExtra() then if not IsExtra() then
if GetUserPrefB("UserPrefShowLotsaOptions") then modLines = GetUserPrefB("UserPrefShowLotsaOptions")
return GetUserPrefB("UserPrefShowLotsaOptions") and LineSets[1] or LineSets[2]; and LineSets[1] or LineSets[2];
else
return LineSets[2]; -- Just make sure!
end
else
return "1,8,14,2,7,13,16,17,18" -- "failsafe" list
end end
return CheckCharacters(modLines);
end; end;
function UserPrefAutoSetStyle() function UserPrefAutoSetStyle()
+1
View File
@@ -173,6 +173,7 @@ my @files = (
"NoteSkins/pump/default", "NoteSkins/pump/default",
"NoteSkins/pump/frame5p", "NoteSkins/pump/frame5p",
"NoteSkins/pump/newextra", "NoteSkins/pump/newextra",
"NoteSkins/pump/pad",
"NoteSkins/pump/rhythm", "NoteSkins/pump/rhythm",
"NoteSkins/pump/simple", "NoteSkins/pump/simple",
# kb7 noteskins # kb7 noteskins
+3 -1
View File
@@ -11,9 +11,11 @@ AC_DEFUN([SM_X_WITH_OPENGL],
fi fi
if test -n "$x_libraries"; then if test -n "$x_libraries"; then
XLIBS="-L$x_libraries -lX11" XLIBS="-L$x_libraries"
fi fi
XLIBS +="-lX11"
if test -n "$x_includes"; then if test -n "$x_includes"; then
# See if we can compile X applications without using $XCFLAGS. # See if we can compile X applications without using $XCFLAGS.
AC_MSG_CHECKING(if $XCFLAGS is really necessary) AC_MSG_CHECKING(if $XCFLAGS is really necessary)
+1
View File
@@ -383,6 +383,7 @@ Section "Main Section" SecMain
CreateDirectory "$INSTDIR\Songs" CreateDirectory "$INSTDIR\Songs"
SetOutPath "$INSTDIR\Songs" SetOutPath "$INSTDIR\Songs"
;File "Songs\Instructions.txt" ;File "Songs\Instructions.txt"
File /r /x CVS /x .svn "Songs\*"
; remove and install themes ; remove and install themes
RMDir /r "$INSTDIR\Themes\_fallback" RMDir /r "$INSTDIR\Themes\_fallback"
+14 -14
View File
@@ -56,8 +56,8 @@ static ThemeMetric<float> DRUNK_OFFSET_FREQUENCY( "ArrowEffects", "DrunkOffsetFr
static ThemeMetric<float> DRUNK_ARROW_MAGNITUDE( "ArrowEffects", "DrunkArrowMagnitude" ); static ThemeMetric<float> DRUNK_ARROW_MAGNITUDE( "ArrowEffects", "DrunkArrowMagnitude" );
static ThemeMetric<float> BEAT_OFFSET_HEIGHT( "ArrowEffects", "BeatOffsetHeight" ); static ThemeMetric<float> BEAT_OFFSET_HEIGHT( "ArrowEffects", "BeatOffsetHeight" );
static ThemeMetric<float> BEAT_PI_HEIGHT( "ArrowEffects", "BeatPIHeight" ); static ThemeMetric<float> BEAT_PI_HEIGHT( "ArrowEffects", "BeatPIHeight" );
static ThemeMetric<float> MINI_PERCENT_BASE( "ArrowEffects", "MiniPercentBase" ); static ThemeMetric<float> TINY_PERCENT_BASE( "ArrowEffects", "TinyPercentBase" );
static ThemeMetric<float> MINI_PERCENT_GATE( "ArrowEffects", "MiniPercentGate" ); static ThemeMetric<float> TINY_PERCENT_GATE( "ArrowEffects", "TinyPercentGate" );
static ThemeMetric<bool> DIZZY_HOLD_HEADS( "ArrowEffects", "DizzyHoldHeads" ); static ThemeMetric<bool> DIZZY_HOLD_HEADS( "ArrowEffects", "DizzyHoldHeads" );
float ArrowGetPercentVisible( const PlayerState* pPlayerState, float fYPosWithoutReverse ); float ArrowGetPercentVisible( const PlayerState* pPlayerState, float fYPosWithoutReverse );
@@ -345,8 +345,8 @@ float ArrowEffects::GetYOffset( const PlayerState* pPlayerState, int iCol, float
static void ArrowGetReverseShiftAndScale( const PlayerState* pPlayerState, int iCol, float fYReverseOffsetPixels, float &fShiftOut, float &fScaleOut ) static void ArrowGetReverseShiftAndScale( const PlayerState* pPlayerState, int iCol, float fYReverseOffsetPixels, float &fShiftOut, float &fScaleOut )
{ {
// XXX: Hack: we need to scale the reverse shift by the zoom. // XXX: Hack: we need to scale the reverse shift by the zoom.
float fTinyPercent = pPlayerState->m_PlayerOptions.GetCurrent().m_fEffects[PlayerOptions::EFFECT_TINY]; float fMiniPercent = pPlayerState->m_PlayerOptions.GetCurrent().m_fEffects[PlayerOptions::EFFECT_MINI];
float fZoom = 1 - fTinyPercent*0.5f; float fZoom = 1 - fMiniPercent*0.5f;
// don't divide by 0 // don't divide by 0
if( fabsf(fZoom) < 0.01 ) if( fabsf(fZoom) < 0.01 )
@@ -489,12 +489,12 @@ float ArrowEffects::GetXPos( const PlayerState* pPlayerState, int iColNum, float
fPixelOffsetFromCenter += pCols[iColNum].fXOffset; fPixelOffsetFromCenter += pCols[iColNum].fXOffset;
if( fEffects[PlayerOptions::EFFECT_MINI] != 0 ) if( fEffects[PlayerOptions::EFFECT_TINY] != 0 )
{ {
// Allow Mini to pull tracks together, but not to push them apart. // Allow Tiny to pull tracks together, but not to push them apart.
float fMiniPercent = fEffects[PlayerOptions::EFFECT_MINI]; float fTinyPercent = fEffects[PlayerOptions::EFFECT_TINY];
fMiniPercent = min( powf(MINI_PERCENT_BASE, fMiniPercent), (float)MINI_PERCENT_GATE ); fTinyPercent = min( powf(TINY_PERCENT_BASE, fTinyPercent), (float)TINY_PERCENT_GATE );
fPixelOffsetFromCenter *= fMiniPercent; fPixelOffsetFromCenter *= fTinyPercent;
} }
return fPixelOffsetFromCenter; return fPixelOffsetFromCenter;
@@ -565,7 +565,7 @@ static float GetCenterLine( const PlayerState* pPlayerState )
{ {
/* Another mini hack: if EFFECT_MINI is on, then our center line is at /* Another mini hack: if EFFECT_MINI is on, then our center line is at
* eg. 320, not 160. */ * eg. 320, not 160. */
const float fMiniPercent = pPlayerState->m_PlayerOptions.GetCurrent().m_fEffects[PlayerOptions::EFFECT_TINY]; const float fMiniPercent = pPlayerState->m_PlayerOptions.GetCurrent().m_fEffects[PlayerOptions::EFFECT_MINI];
const float fZoom = 1 - fMiniPercent*0.5f; const float fZoom = 1 - fMiniPercent*0.5f;
return CENTER_LINE_Y / fZoom; return CENTER_LINE_Y / fZoom;
} }
@@ -741,11 +741,11 @@ float ArrowEffects::GetZoom( const PlayerState* pPlayerState )
(GAMESTATE->GetNumSidesJoined()==2 || GAMESTATE->AnyPlayersAreCpu()) ) (GAMESTATE->GetNumSidesJoined()==2 || GAMESTATE->AnyPlayersAreCpu()) )
fZoom *= 0.6f; fZoom *= 0.6f;
float fMiniPercent = pPlayerState->m_PlayerOptions.GetCurrent().m_fEffects[PlayerOptions::EFFECT_MINI]; float fTinyPercent = pPlayerState->m_PlayerOptions.GetCurrent().m_fEffects[PlayerOptions::EFFECT_TINY];
if( fMiniPercent != 0 ) if( fTinyPercent != 0 )
{ {
fMiniPercent = powf( 0.5f, fMiniPercent ); fTinyPercent = powf( 0.5f, fTinyPercent );
fZoom *= fMiniPercent; fZoom *= fTinyPercent;
} }
return fZoom; return fZoom;
} }
+9 -1
View File
@@ -89,7 +89,7 @@ Character* CharacterManager::GetDefaultCharacter()
} }
/* We always have the default character. */ /* We always have the default character. */
ASSERT(0); FAIL_M("There must be a default character available!");
return NULL; return NULL;
} }
@@ -152,6 +152,13 @@ public:
LuaHelpers::CreateTableFromArray(vChars, L); LuaHelpers::CreateTableFromArray(vChars, L);
return 1; return 1;
} }
static int GetCharacterCount(T* p, lua_State *L)
{
vector<Character*> chars;
p->GetCharacters(chars);
lua_pushnumber(L, chars.size());
return 1;
}
LunaCharacterManager() LunaCharacterManager()
{ {
@@ -159,6 +166,7 @@ public:
// sm-ssc adds: // sm-ssc adds:
ADD_METHOD( GetRandomCharacter ); ADD_METHOD( GetRandomCharacter );
ADD_METHOD( GetAllCharacters ); ADD_METHOD( GetAllCharacters );
ADD_METHOD( GetCharacterCount );
} }
}; };
+7 -2
View File
@@ -1,19 +1,24 @@
/* CharacterManager - Manage characters. */
#ifndef CHARACTER_MANAGER_H #ifndef CHARACTER_MANAGER_H
#define CHARACTER_MANAGER_H #define CHARACTER_MANAGER_H
class Character; class Character;
struct lua_State; struct lua_State;
/** @brief Manage all of the Characters. */
class CharacterManager class CharacterManager
{ {
public: public:
/** @brief Set up the character manager. */
CharacterManager(); CharacterManager();
/** @brief Destroy the character manager. */
~CharacterManager(); ~CharacterManager();
void GetCharacters( vector<Character*> &vpCharactersOut ); void GetCharacters( vector<Character*> &vpCharactersOut );
/** @brief Get one installed character at random.
* @return The random character. */
Character* GetRandomCharacter(); Character* GetRandomCharacter();
/** @brief Get the character assigned as the default.
* @return The default character. */
Character* GetDefaultCharacter(); Character* GetDefaultCharacter();
Character* GetCharacterFromID( RString sCharacterID ); Character* GetCharacterFromID( RString sCharacterID );
+60 -10
View File
@@ -251,7 +251,7 @@ static const Style g_Style_Dance_Double =
static const Style g_Style_Dance_Couple = static const Style g_Style_Dance_Couple =
{ // STYLE_DANCE_COUPLE { // STYLE_DANCE_COUPLE
true, // m_bUsedForGameplay true, // m_bUsedForGameplay
true, // m_bUsedForEdit false, // m_bUsedForEdit
false, // m_bUsedForDemonstration false, // m_bUsedForDemonstration
false, // m_bUsedForHowToPlay false, // m_bUsedForHowToPlay
"couple", // m_szName "couple", // m_szName
@@ -324,6 +324,50 @@ static const Style g_Style_Dance_Solo =
false, // m_bLockDifficulties false, // m_bLockDifficulties
}; };
static const Style g_Style_Dance_Couple_Edit =
{ // STYLE_DANCE_COUPLE
false, // m_bUsedForGameplay
true, // m_bUsedForEdit
false, // m_bUsedForDemonstration
false, // m_bUsedForHowToPlay
"couple-edit", // m_szName
StepsType_dance_couple, // m_StepsType
StyleType_OnePlayerTwoSides, // m_StyleType
8, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
{ TRACK_1, -DANCE_COL_SPACING*4.f, NULL },
{ TRACK_2, -DANCE_COL_SPACING*3.f, NULL },
{ TRACK_3, -DANCE_COL_SPACING*2.f, NULL },
{ TRACK_4, -DANCE_COL_SPACING*1.f, NULL },
{ TRACK_5, +DANCE_COL_SPACING*1.f, NULL },
{ TRACK_6, +DANCE_COL_SPACING*2.f, NULL },
{ TRACK_7, +DANCE_COL_SPACING*3.f, NULL },
{ TRACK_8, +DANCE_COL_SPACING*4.f, NULL },
},
{ // PLAYER_2
{ TRACK_1, -DANCE_COL_SPACING*4.f, NULL },
{ TRACK_2, -DANCE_COL_SPACING*3.f, NULL },
{ TRACK_3, -DANCE_COL_SPACING*2.f, NULL },
{ TRACK_4, -DANCE_COL_SPACING*1.f, NULL },
{ TRACK_5, +DANCE_COL_SPACING*1.f, NULL },
{ TRACK_6, +DANCE_COL_SPACING*2.f, NULL },
{ TRACK_7, +DANCE_COL_SPACING*3.f, NULL },
{ TRACK_8, +DANCE_COL_SPACING*4.f, NULL },
},
},
{ // m_iInputColumn[NUM_GameController][NUM_GameButton]
{ 0, 3, 2, 1, Style::END_MAPPING },
{ 4, 7, 6, 5, Style::END_MAPPING },
},
{ // m_iColumnDrawOrder[MAX_COLS_PER_PLAYER];
0,1,2,3,4,5,6,7
},
false, // m_bNeedsZoomOutWith2Players
false, // m_bCanUseBeginnerHelper
false, // m_bLockDifficulties
};
static const Style g_Style_Dance_ThreePanel = static const Style g_Style_Dance_ThreePanel =
{ // STYLE_DANCE_THREEPANEL { // STYLE_DANCE_THREEPANEL
true, // m_bUsedForGameplay true, // m_bUsedForGameplay
@@ -449,6 +493,7 @@ static const Style *g_apGame_Dance_Styles[] =
&g_Style_Dance_Double, &g_Style_Dance_Double,
&g_Style_Dance_Couple, &g_Style_Dance_Couple,
&g_Style_Dance_Solo, &g_Style_Dance_Solo,
&g_Style_Dance_Couple_Edit,
&g_Style_Dance_Routine, &g_Style_Dance_Routine,
&g_Style_Dance_ThreePanel, &g_Style_Dance_ThreePanel,
NULL NULL
@@ -725,7 +770,7 @@ static const Style g_Style_Pump_Couple_Edit =
false, // m_bUsedForHowToPlay false, // m_bUsedForHowToPlay
"couple-edit", // m_szName "couple-edit", // m_szName
StepsType_pump_couple, // m_StepsType StepsType_pump_couple, // m_StepsType
StyleType_OnePlayerOneSide, // m_StyleType StyleType_OnePlayerTwoSides, // m_StyleType
10, // m_iColsPerPlayer 10, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1 { // PLAYER_1
@@ -741,19 +786,24 @@ static const Style g_Style_Pump_Couple_Edit =
{ TRACK_10, +PUMP_COL_SPACING*5.0f+4, NULL }, { TRACK_10, +PUMP_COL_SPACING*5.0f+4, NULL },
}, },
{ // PLAYER_2 { // PLAYER_2
{ TRACK_1, -PUMP_COL_SPACING*2.0f, NULL }, { TRACK_1, -PUMP_COL_SPACING*5.0f-4, NULL },
{ TRACK_2, -PUMP_COL_SPACING*1.0f, NULL }, { TRACK_2, -PUMP_COL_SPACING*4.0f-4, NULL },
{ TRACK_3, +PUMP_COL_SPACING*0.0f, NULL }, { TRACK_3, -PUMP_COL_SPACING*3.0f-4, NULL },
{ TRACK_4, +PUMP_COL_SPACING*1.0f, NULL }, { TRACK_4, -PUMP_COL_SPACING*2.0f-4, NULL },
{ TRACK_5, +PUMP_COL_SPACING*2.0f, NULL }, { TRACK_5, -PUMP_COL_SPACING*1.0f-4, NULL },
{ TRACK_6, +PUMP_COL_SPACING*1.0f+4, NULL },
{ TRACK_7, +PUMP_COL_SPACING*2.0f+4, NULL },
{ TRACK_8, +PUMP_COL_SPACING*3.0f+4, NULL },
{ TRACK_9, +PUMP_COL_SPACING*4.0f+4, NULL },
{ TRACK_10, +PUMP_COL_SPACING*5.0f+4, NULL },
}, },
}, },
{ // m_iInputColumn[NUM_GameController][NUM_GameButton] { // m_iInputColumn[NUM_GameController][NUM_GameButton]
{ 1, 3, 2, 0, 4, 6, 8, 7, 5, 9, Style::END_MAPPING }, { 1, 3, 2, 0, 4, Style::END_MAPPING },
{ 1, 3, 2, 0, 4, 6, 8, 7, 5, 9, Style::END_MAPPING }, { 6, 8, 7, 5, 9, Style::END_MAPPING },
}, },
{ // m_iColumnDrawOrder[MAX_COLS_PER_PLAYER]; { // m_iColumnDrawOrder[MAX_COLS_PER_PLAYER];
2,1,3,0,4 2,1,3,0,4, 2+5,1+5,3+5,0+5,4+5
}, },
false, // m_bNeedsZoomOutWith2Players false, // m_bNeedsZoomOutWith2Players
false, // m_bCanUseBeginnerHelper false, // m_bCanUseBeginnerHelper
+5 -1
View File
@@ -712,7 +712,11 @@ void GameState::BeginStage()
if( !ARE_STAGE_PLAYER_MODS_FORCED ) if( !ARE_STAGE_PLAYER_MODS_FORCED )
{ {
FOREACH_PlayerNumber( p ) FOREACH_PlayerNumber( p )
m_pPlayerState[p]->m_PlayerOptions.Assign( ModsLevel_Stage, m_pPlayerState[p]->m_PlayerOptions.GetPreferred() ); {
ModsGroup<PlayerOptions> &po = m_pPlayerState[p]->m_PlayerOptions;
po.Assign(ModsLevel_Stage,
m_pPlayerState[p]->m_PlayerOptions.GetPreferred());
}
} }
if( !ARE_STAGE_SONG_MODS_FORCED ) if( !ARE_STAGE_SONG_MODS_FORCED )
m_SongOptions.Assign( ModsLevel_Stage, m_SongOptions.GetPreferred() ); m_SongOptions.Assign( ModsLevel_Stage, m_SongOptions.GetPreferred() );
+10 -2
View File
@@ -1405,8 +1405,12 @@ RString MusicWheel::JumpToNextGroup()
for(unsigned i = 0 ; i < iNumGroups ; i++) for(unsigned i = 0 ; i < iNumGroups ; i++)
{ {
if( m_sExpandedSectionName == SONGMAN->GetSongGroupByIndex(i) ) RString sCurSongGroup = SONGMAN->GetSongGroupByIndex(i);
if( m_sExpandedSectionName == sCurSongGroup )
{ {
if( SONGMAN->GetSongsOfCurrentGame(sCurSongGroup).size() == 0 ) continue;
if ( i < iNumGroups - 1 ) if ( i < iNumGroups - 1 )
return SONGMAN->GetSongGroupByIndex(i+1); return SONGMAN->GetSongGroupByIndex(i+1);
else else
@@ -1451,8 +1455,12 @@ RString MusicWheel::JumpToPrevGroup()
for(unsigned i = 0 ; i < iNumGroups ; i++) for(unsigned i = 0 ; i < iNumGroups ; i++)
{ {
if( m_sExpandedSectionName == SONGMAN->GetSongGroupByIndex(i) ) RString sCurSongGroup = SONGMAN->GetSongGroupByIndex(i);
if( m_sExpandedSectionName == sCurSongGroup )
{ {
if( SONGMAN->GetSongsOfCurrentGame(sCurSongGroup).size() == 0 ) continue;
if ( i > 0 ) if ( i > 0 )
return SONGMAN->GetSongGroupByIndex(i-1); return SONGMAN->GetSongGroupByIndex(i-1);
else else
+1 -1
View File
@@ -349,7 +349,7 @@ void NoteDataWithScoring::GetActualRadarValues( const NoteData &in, const Player
case RadarCategory_Hands: out[rc] = (float) GetSuccessfulHands( in ); break; case RadarCategory_Hands: out[rc] = (float) GetSuccessfulHands( in ); break;
case RadarCategory_Rolls: out[rc] = (float) GetNumHoldNotesWithScore( in, TapNote::hold_head_roll, HNS_Held ); break; case RadarCategory_Rolls: out[rc] = (float) GetNumHoldNotesWithScore( in, TapNote::hold_head_roll, HNS_Held ); break;
case RadarCategory_Lifts: out[rc] = (float) GetSuccessfulLifts( in, TNS_W4 ); break; case RadarCategory_Lifts: out[rc] = (float) GetSuccessfulLifts( in, TNS_W4 ); break;
case RadarCategory_Fakes: out[rc] = (float) in.GetNumLifts(); break; case RadarCategory_Fakes: out[rc] = (float) in.GetNumFakes(); break;
//case RadarCategory_Minefields: out[rc] = (float) GetNumMinefieldsWithScore( in, TapNote::hold_head_mine, HNS_Held ); break; //case RadarCategory_Minefields: out[rc] = (float) GetNumMinefieldsWithScore( in, TapNote::hold_head_mine, HNS_Held ); break;
DEFAULT_FAIL( rc ); DEFAULT_FAIL( rc );
} }
+6 -4
View File
@@ -211,9 +211,9 @@ void NoteField::Load(
//int i1 = m_pNoteData->GetNumTracks(); //int i1 = m_pNoteData->GetNumTracks();
//int i2 = GAMESTATE->GetCurrentStyle()->m_iColsPerPlayer; //int i2 = GAMESTATE->GetCurrentStyle()->m_iColsPerPlayer;
ASSERT_M(m_pNoteData->GetNumTracks() == GAMESTATE->GetCurrentStyle()->m_iColsPerPlayer, ASSERT_M(m_pNoteData->GetNumTracks() == GAMESTATE->GetCurrentStyle()->m_iColsPerPlayer,
ssprintf("NumTracks %d = ColsPerPlayer %d",m_pNoteData->GetNumTracks(), GAMESTATE->GetCurrentStyle()->m_iColsPerPlayer) ); ssprintf("NumTracks %d = ColsPerPlayer %d",m_pNoteData->GetNumTracks(),
GAMESTATE->GetCurrentStyle()->m_iColsPerPlayer));
// The NoteSkin may have changed at the beginning of a new course song. // The NoteSkin may have changed at the beginning of a new course song.
RString sNoteSkinLower = m_pPlayerState->m_PlayerOptions.GetCurrent().m_sNoteSkin; RString sNoteSkinLower = m_pPlayerState->m_PlayerOptions.GetCurrent().m_sNoteSkin;
@@ -817,7 +817,7 @@ void NoteField::DrawPrimitives()
float fDrawScale = 1; float fDrawScale = 1;
fDrawScale *= 1 + 0.5f * fabsf( current_po.m_fPerspectiveTilt ); fDrawScale *= 1 + 0.5f * fabsf( current_po.m_fPerspectiveTilt );
fDrawScale *= 1 + fabsf( current_po.m_fEffects[PlayerOptions::EFFECT_TINY] ); fDrawScale *= 1 + fabsf( current_po.m_fEffects[PlayerOptions::EFFECT_MINI] );
iDrawDistanceAfterTargetsPixels = (int)(iDrawDistanceAfterTargetsPixels * fDrawScale); iDrawDistanceAfterTargetsPixels = (int)(iDrawDistanceAfterTargetsPixels * fDrawScale);
iDrawDistanceBeforeTargetsPixels = (int)(iDrawDistanceBeforeTargetsPixels * fDrawScale); iDrawDistanceBeforeTargetsPixels = (int)(iDrawDistanceBeforeTargetsPixels * fDrawScale);
@@ -1162,7 +1162,9 @@ void NoteField::DrawPrimitives()
float fSelectedRangeGlow = SCALE( RageFastCos(RageTimer::GetTimeSinceStartFast()*2), -1, 1, 0.1f, 0.3f ); float fSelectedRangeGlow = SCALE( RageFastCos(RageTimer::GetTimeSinceStartFast()*2), -1, 1, 0.1f, 0.3f );
const Style* pStyle = GAMESTATE->GetCurrentStyle(); const Style* pStyle = GAMESTATE->GetCurrentStyle();
ASSERT( GAMESTATE->GetCurrentStyle()->m_iColsPerPlayer == m_pNoteData->GetNumTracks() ); ASSERT_M(m_pNoteData->GetNumTracks() == GAMESTATE->GetCurrentStyle()->m_iColsPerPlayer,
ssprintf("NumTracks %d = ColsPerPlayer %d",m_pNoteData->GetNumTracks(),
GAMESTATE->GetCurrentStyle()->m_iColsPerPlayer));
for( int i=0; i<m_pNoteData->GetNumTracks(); i++ ) // for each arrow column for( int i=0; i<m_pNoteData->GetNumTracks(); i++ ) // for each arrow column
{ {
+2 -2
View File
@@ -867,7 +867,7 @@ void Player::Update( float fDeltaTime )
Actor::TweenState::MakeWeightedAverage( m_pActorWithComboPosition->DestTweenState(), ts1, ts2, fPercentCentered ); Actor::TweenState::MakeWeightedAverage( m_pActorWithComboPosition->DestTweenState(), ts1, ts2, fPercentCentered );
} }
float fNoteFieldZoom = 1 - fTinyPercent*0.5f; float fNoteFieldZoom = 1 - fMiniPercent*0.5f;
if( m_pNoteField ) if( m_pNoteField )
m_pNoteField->SetZoom( fNoteFieldZoom ); m_pNoteField->SetZoom( fNoteFieldZoom );
if( m_pActorWithJudgmentPosition != NULL ) if( m_pActorWithJudgmentPosition != NULL )
@@ -1488,7 +1488,7 @@ void Player::DrawPrimitives()
float fTiltDegrees = SCALE(fTilt,-1.f,+1.f,+30,-30) * (bReverse?-1:1); float fTiltDegrees = SCALE(fTilt,-1.f,+1.f,+30,-30) * (bReverse?-1:1);
float fZoom = SCALE( m_pPlayerState->m_PlayerOptions.GetCurrent().m_fEffects[PlayerOptions::EFFECT_TINY], 0.f, 1.f, 1.f, 0.5f ); float fZoom = SCALE( m_pPlayerState->m_PlayerOptions.GetCurrent().m_fEffects[PlayerOptions::EFFECT_MINI], 0.f, 1.f, 1.f, 0.5f );
if( fTilt > 0 ) if( fTilt > 0 )
fZoom *= SCALE( fTilt, 0.f, 1.f, 1.f, 0.9f ); fZoom *= SCALE( fTilt, 0.f, 1.f, 1.f, 0.9f );
else else
+1 -1
View File
@@ -61,7 +61,7 @@ void PlayerOptions::Approach( const PlayerOptions& other, float fDeltaSeconds )
APPROACH( fTimeSpacing ); APPROACH( fTimeSpacing );
APPROACH( fScrollSpeed ); APPROACH( fScrollSpeed );
APPROACH( fMaxScrollBPM ); //APPROACH( fMaxScrollBPM );
fapproach( m_fScrollBPM, other.m_fScrollBPM, fDeltaSeconds * other.m_SpeedfScrollBPM*150 ); fapproach( m_fScrollBPM, other.m_fScrollBPM, fDeltaSeconds * other.m_SpeedfScrollBPM*150 );
for( int i=0; i<NUM_ACCELS; i++ ) for( int i=0; i<NUM_ACCELS; i++ )
APPROACH( fAccels[i] ); APPROACH( fAccels[i] );
+2 -2
View File
@@ -7,10 +7,10 @@
!define PRODUCT_ID "StepMania" !define PRODUCT_ID "StepMania"
!define PRODUCT_VER "v5.0 Preview 2" !define PRODUCT_VER "v5.0 Preview 2"
!define PRODUCT_DISPLAY "${PRODUCT_ID} ${PRODUCT_VER}" !define PRODUCT_DISPLAY "${PRODUCT_ID} ${PRODUCT_VER}"
!define PRODUCT_BITMAP "ssc" !define PRODUCT_BITMAP "sm5"
!define PRODUCT_URL "http://www.stepmania.com/" !define PRODUCT_URL "http://www.stepmania.com/"
!define UPDATES_URL "http://www.stepmania.com/" !define UPDATES_URL "http://code.google.com/p/sm-ssc/downloads/list"
;!define INSTALL_EXTERNAL_PCKS ;!define INSTALL_EXTERNAL_PCKS
;!define INSTALL_INTERNAL_PCKS ;!define INSTALL_INTERNAL_PCKS
+1 -1
View File
@@ -92,7 +92,7 @@ int MersenneTwister::operator()()
void fapproach( float& val, float other_val, float to_move ) void fapproach( float& val, float other_val, float to_move )
{ {
ASSERT_M( to_move >= 0, ssprintf("to_move: %f", to_move) ); ASSERT_M( to_move >= 0, ssprintf("to_move: %f < 0", to_move) );
if( val == other_val ) if( val == other_val )
return; return;
float fDelta = other_val - val; float fDelta = other_val - val;
+89 -6
View File
@@ -343,8 +343,10 @@ void ScreenEdit::InitEditMappings()
// Allow song and step timing to be swapped. // Allow song and step timing to be swapped.
m_EditMappingsDeviceInput.button[EDIT_BUTTON_SWITCH_TIMINGS][0] = DeviceInput(DEVICE_KEYBOARD, KEY_Ct); m_EditMappingsDeviceInput.button[EDIT_BUTTON_SWITCH_TIMINGS][0] = DeviceInput(DEVICE_KEYBOARD, KEY_Ct);
m_PlayMappingsDeviceInput.button[EDIT_BUTTON_RETURN_TO_EDIT][0] = DeviceInput(DEVICE_KEYBOARD, KEY_ESC); m_PlayMappingsDeviceInput.button[EDIT_BUTTON_RETURN_TO_EDIT][0] = DeviceInput(DEVICE_KEYBOARD, KEY_ENTER);
m_PlayMappingsMenuButton.button[EDIT_BUTTON_RETURN_TO_EDIT][1] = GAME_BUTTON_BACK; m_PlayMappingsDeviceInput.button[EDIT_BUTTON_RETURN_TO_EDIT][1] = DeviceInput(DEVICE_KEYBOARD, KEY_ESC);
m_PlayMappingsMenuButton.button[EDIT_BUTTON_RETURN_TO_EDIT][0] = GAME_BUTTON_BACK;
m_PlayMappingsMenuButton.button[EDIT_BUTTON_RETURN_TO_EDIT][1] = GAME_BUTTON_START;
m_RecordMappingsDeviceInput.button[EDIT_BUTTON_LAY_ROLL][0] = DeviceInput(DEVICE_KEYBOARD, KEY_LSHIFT); m_RecordMappingsDeviceInput.button[EDIT_BUTTON_LAY_ROLL][0] = DeviceInput(DEVICE_KEYBOARD, KEY_LSHIFT);
m_RecordMappingsDeviceInput.button[EDIT_BUTTON_LAY_ROLL][1] = DeviceInput(DEVICE_KEYBOARD, KEY_RSHIFT); m_RecordMappingsDeviceInput.button[EDIT_BUTTON_LAY_ROLL][1] = DeviceInput(DEVICE_KEYBOARD, KEY_RSHIFT);
@@ -566,6 +568,12 @@ static MenuDef g_AlterMenu(
MenuRowDef(ScreenEdit::convert_to_warp, "Convert selection to warp", true, MenuRowDef(ScreenEdit::convert_to_warp, "Convert selection to warp", true,
EditMode_Full, true, true, 0, NULL ), EditMode_Full, true, true, 0, NULL ),
MenuRowDef(ScreenEdit::convert_to_fake, "Convert selection to fake", true, MenuRowDef(ScreenEdit::convert_to_fake, "Convert selection to fake", true,
EditMode_Full, true, true, 0, NULL ),
MenuRowDef(ScreenEdit::routine_invert_notes, "Invert notes' player", true,
EditMode_Full, true, true, 0, NULL ),
MenuRowDef(ScreenEdit::routine_mirror_1_to_2, "Mirror Player 1 to 2", true,
EditMode_Full, true, true, 0, NULL ),
MenuRowDef(ScreenEdit::routine_mirror_2_to_1, "Mirror Player 2 to 1", true,
EditMode_Full, true, true, 0, NULL ) EditMode_Full, true, true, 0, NULL )
); );
@@ -1757,6 +1765,10 @@ void ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB )
} }
else else
{ {
bool isRoutine = (m_InputPlayerNumber != PLAYER_INVALID);
g_AlterMenu.rows[routine_invert_notes].bEnabled = isRoutine;
g_AlterMenu.rows[routine_mirror_1_to_2].bEnabled = isRoutine;
g_AlterMenu.rows[routine_mirror_2_to_1].bEnabled = isRoutine;
EditMiniMenu(&g_AlterMenu, SM_BackFromAlterMenu); EditMiniMenu(&g_AlterMenu, SM_BackFromAlterMenu);
} }
break; break;
@@ -2721,7 +2733,7 @@ void ScreenEdit::TransitionEditState( EditState em )
Steps* pSteps = GAMESTATE->m_pCurSteps[PLAYER_1]; Steps* pSteps = GAMESTATE->m_pCurSteps[PLAYER_1];
ASSERT( pSteps ); ASSERT( pSteps );
pSteps->SetNoteData( m_NoteDataEdit ); pSteps->SetNoteData( m_NoteDataEdit );
m_pSong->ReCalculateRadarValuesAndLastBeat(); m_pSong->ReCalculateRadarValuesAndLastSecond();
m_Background.Unload(); m_Background.Unload();
m_Background.LoadFromSong( m_pSong ); m_Background.LoadFromSong( m_pSong );
@@ -3126,7 +3138,7 @@ void ScreenEdit::HandleScreenMessage( const ScreenMessage SM )
if (ScreenMiniMenu::s_iLastRowCode == ScreenEdit::remove ) if (ScreenMiniMenu::s_iLastRowCode == ScreenEdit::remove )
{ {
ASSERT(iAttack >= 0); if (iAttack > 0)
attacks.erase(attacks.begin() + iAttack); attacks.erase(attacks.begin() + iAttack);
} }
else else
@@ -3884,7 +3896,7 @@ void ScreenEdit::HandleAlterMenuChoice(AlterMenuChoice c, const vector<int> &iAn
{ {
DEFAULT_FAIL( tt ); DEFAULT_FAIL( tt );
case noholds: NoteDataUtil::RemoveHoldNotes( m_NoteDataEdit, iBeginRow, iEndRow ); break; case noholds: NoteDataUtil::RemoveHoldNotes( m_NoteDataEdit, iBeginRow, iEndRow ); break;
case nomines: NoteDataUtil::RemoveMines( m_NoteDataEdit, iBeginRow, iBeginRow ); break; case nomines: NoteDataUtil::RemoveMines( m_NoteDataEdit, iBeginRow, iEndRow ); break;
case little: NoteDataUtil::Little( m_NoteDataEdit, iBeginRow, iEndRow ); break; case little: NoteDataUtil::Little( m_NoteDataEdit, iBeginRow, iEndRow ); break;
case wide: NoteDataUtil::Wide( m_NoteDataEdit, iBeginRow, iEndRow ); break; case wide: NoteDataUtil::Wide( m_NoteDataEdit, iBeginRow, iEndRow ); break;
case big: NoteDataUtil::Big( m_NoteDataEdit, iBeginRow, iEndRow ); break; case big: NoteDataUtil::Big( m_NoteDataEdit, iBeginRow, iEndRow ); break;
@@ -4057,7 +4069,78 @@ void ScreenEdit::HandleAlterMenuChoice(AlterMenuChoice c, const vector<int> &iAn
SetDirty(true); SetDirty(true);
break; break;
} }
case routine_invert_notes:
{
NoteData &nd = this->m_NoteDataEdit;
NoteField &nf = this->m_NoteFieldEdit;
FOREACH_NONEMPTY_ROW_ALL_TRACKS_RANGE(nd, r,
nf.m_iBeginMarker,
nf.m_iEndMarker)
{
for (int t = 0; t < nd.GetNumTracks(); t++)
{
const TapNote &tn = nd.GetTapNote(t, r);
if (tn.type != TapNote::empty)
{
TapNote nTap = tn;
nTap.pn = (tn.pn == PLAYER_1 ?
PLAYER_2 : PLAYER_1);
m_NoteDataEdit.SetTapNote(t, r, nTap);
}
}
}
break;
}
case routine_mirror_1_to_2:
case routine_mirror_2_to_1:
{
PlayerNumber oPN = (c == routine_mirror_1_to_2 ?
PLAYER_1 : PLAYER_2);
PlayerNumber nPN = (c == routine_mirror_1_to_2 ?
PLAYER_2 : PLAYER_1);
int nTrack = -1;
NoteData &nd = this->m_NoteDataEdit;
NoteField &nf = this->m_NoteFieldEdit;
int tracks = nd.GetNumTracks();
FOREACH_NONEMPTY_ROW_ALL_TRACKS_RANGE(nd, r,
nf.m_iBeginMarker,
nf.m_iEndMarker)
{
for (int t = 0; t < tracks; t++)
{
const TapNote &tn = nd.GetTapNote(t, r);
if (tn.type != TapNote::empty && tn.pn == oPN)
{
TapNote nTap = tn;
nTap.pn = nPN;
StepsType curType = GAMESTATE->m_pCurSteps[PLAYER_1]->m_StepsType;
if (curType == StepsType_dance_routine)
{
nTrack = tracks - t - 1;
}
else if (curType == StepsType_pump_routine)
{
switch (t)
{
case 0: nTrack = 8; break;
case 1: nTrack = 9; break;
case 2: nTrack = 7; break;
case 3: nTrack = 5; break;
case 4: nTrack = 6; break;
case 5: nTrack = 3; break;
case 6: nTrack = 4; break;
case 7: nTrack = 2; break;
case 8: nTrack = 0; break;
case 9: nTrack = 1; break;
default: FAIL_M(ssprintf("Invalid column %d for pump-routine", t)); break;
}
}
m_NoteDataEdit.SetTapNote(nTrack, r, nTap);
}
}
}
break;
}
} }
} }
+19 -15
View File
@@ -390,23 +390,27 @@ public:
void HandleMainMenuChoice( MainMenuChoice c ) { const vector<int> v; HandleMainMenuChoice( c, v ); } void HandleMainMenuChoice( MainMenuChoice c ) { const vector<int> v; HandleMainMenuChoice( c, v ); }
MainMenuChoice m_CurrentAction; MainMenuChoice m_CurrentAction;
/** @brief How does one alter a selection of NoteData? */
enum AlterMenuChoice enum AlterMenuChoice
{ {
cut, cut, /**< Cut the notes. */
copy, copy, /**< Copy the notes. */
clear, clear, /**< Erase the notes, without putting them in the clipboard. */
quantize, quantize, /**< Sync the notes to an exact level. */
turn, turn, /**< Rotate the notes. */
transform, transform, /**< Activate a specific mod. */
alter, alter, /**< Perform other transformations. */
tempo, tempo, /**< Modify the tempo of the notes. */
play, play, /**< Play the notes in the range. */
record, record, /**< Record new notes in the range. */
preview_designation, preview_designation, /**< Set the area as the music preview. */
convert_to_pause, convert_to_pause, /**< Convert the range into a StopSegment. */
convert_to_delay, convert_to_delay, /**< Convert the range into a DelaySegment. */
convert_to_warp, convert_to_warp, /**< Convert the range into a WarpSegment. */
convert_to_fake, convert_to_fake, /**< Convert the range into a FakeSegment. */
routine_invert_notes, /**< Switch which player hits the note. */
routine_mirror_1_to_2, /**< Mirror Player 1's notes for Player 2. */
routine_mirror_2_to_1, /**< Mirror Player 2's notes for Player 1. */
NUM_ALTER_MENU_CHOICES NUM_ALTER_MENU_CHOICES
}; };
+16 -1
View File
@@ -1784,7 +1784,22 @@ void ScreenGameplay::Update( float fDeltaTime )
// update give up // update give up
bool bGiveUpTimerFired = !m_GiveUpTimer.IsZero() && m_GiveUpTimer.Ago() > 2.5f; bool bGiveUpTimerFired = !m_GiveUpTimer.IsZero() && m_GiveUpTimer.Ago() > 2.5f;
bool bAllHumanHaveBigMissCombo = FAIL_ON_MISS_COMBO.GetValue() != -1 && STATSMAN->m_CurStageStats.GetMinimumMissCombo() >= FAIL_ON_MISS_COMBO;
bool bAllHumanHaveBigMissCombo = true;
FOREACH_EnabledPlayerNumberInfo( m_vPlayerInfo, pi )
{
if (pi->GetPlayerState()->m_PlayerOptions.GetCurrent().m_FailType == PlayerOptions::FAIL_OFF ||
pi->GetPlayerState()->m_HealthState < HealthState_Dead )
{
bAllHumanHaveBigMissCombo = false;
break;
}
}
if (bAllHumanHaveBigMissCombo) // possible to get in here.
{
bAllHumanHaveBigMissCombo = FAIL_ON_MISS_COMBO.GetValue() != -1 && STATSMAN->m_CurStageStats.GetMinimumMissCombo() >= FAIL_ON_MISS_COMBO;
}
if( bGiveUpTimerFired || bAllHumanHaveBigMissCombo ) if( bGiveUpTimerFired || bAllHumanHaveBigMissCombo )
{ {
STATSMAN->m_CurStageStats.m_bGaveUp = true; STATSMAN->m_CurStageStats.m_bGaveUp = true;
+1 -1
View File
@@ -194,7 +194,7 @@ void ScreenJukebox::Init()
PO_GROUP_CALL( GAMESTATE->m_pPlayerState[p]->m_PlayerOptions, ModsLevel_Stage, Init ); PO_GROUP_CALL( GAMESTATE->m_pPlayerState[p]->m_PlayerOptions, ModsLevel_Stage, Init );
PO_GROUP_ASSIGN( GAMESTATE->m_pPlayerState[p]->m_PlayerOptions, ModsLevel_Stage, m_fScrollSpeed, .25f ); PO_GROUP_ASSIGN( GAMESTATE->m_pPlayerState[p]->m_PlayerOptions, ModsLevel_Stage, m_fScrollSpeed, .25f );
PO_GROUP_ASSIGN( GAMESTATE->m_pPlayerState[p]->m_PlayerOptions, ModsLevel_Stage, m_fPerspectiveTilt, -1.0f ); PO_GROUP_ASSIGN( GAMESTATE->m_pPlayerState[p]->m_PlayerOptions, ModsLevel_Stage, m_fPerspectiveTilt, -1.0f );
PO_GROUP_ASSIGN_N( GAMESTATE->m_pPlayerState[p]->m_PlayerOptions, ModsLevel_Stage, m_fEffects, PlayerOptions::EFFECT_MINI, 1.0f ); PO_GROUP_ASSIGN_N( GAMESTATE->m_pPlayerState[p]->m_PlayerOptions, ModsLevel_Stage, m_fEffects, PlayerOptions::EFFECT_TINY, 1.0f );
} }
SO_GROUP_ASSIGN( GAMESTATE->m_SongOptions, ModsLevel_Stage, m_LifeType, SongOptions::LIFE_BATTERY ); SO_GROUP_ASSIGN( GAMESTATE->m_SongOptions, ModsLevel_Stage, m_LifeType, SongOptions::LIFE_BATTERY );
} }
+4 -1
View File
@@ -494,7 +494,10 @@ static void DefaultFailType( int &sel, bool ToSel, const ConfOption *pConfOption
case 2: po.m_FailType = PlayerOptions::FAIL_AT_END; break; case 2: po.m_FailType = PlayerOptions::FAIL_AT_END; break;
case 3: po.m_FailType = PlayerOptions::FAIL_OFF; break; case 3: po.m_FailType = PlayerOptions::FAIL_OFF; break;
default: default:
ASSERT(0); {
LOG->Warn("Invalid fail type %d! Going to use the default...", sel);
po.m_FailType = PlayerOptions::FAIL_IMMEDIATE; break;
}
} }
SetPrefsDefaultModifiers( po, so ); SetPrefsDefaultModifiers( po, so );
+223 -56
View File
@@ -283,7 +283,11 @@ bool Song::LoadFromSongDir( RString sDir )
if( bUseCache ) if( bUseCache )
{ {
// LOG->Trace( "Loading '%s' from cache file '%s'.", m_sSongDir.c_str(), GetCacheFilePath().c_str() ); /*
LOG->Trace("Loading '%s' from cache file '%s'.",
m_sSongDir.c_str(),
GetCacheFilePath().c_str());
*/
SSCLoader loaderSSC; SSCLoader loaderSSC;
bool bLoadedFromSSC = loaderSSC.LoadFromSimfile( sCacheFilePath, *this, true ); bool bLoadedFromSSC = loaderSSC.LoadFromSimfile( sCacheFilePath, *this, true );
if( !bLoadedFromSSC ) if( !bLoadedFromSSC )
@@ -379,13 +383,13 @@ bool Song::ReloadFromSongDir( RString sDir )
FOREACH_ENUM( StepsType, i ) FOREACH_ENUM( StepsType, i )
m_vpStepsByType[i].clear(); m_vpStepsByType[i].clear();
// Then we copy as many Steps as possible on top of the old pointers. /* Then we copy as many Steps as possible on top of the old pointers.
// The only pointers that change are pointers to Steps that are not in the * The only pointers that change are pointers to Steps that are not in the
// reverted file, which we delete, and pointers to Steps that are in the * reverted file, which we delete, and pointers to Steps that are in the
// reverted file but not the original *this, which we create new copies of. * reverted file but not the original *this, which we create new copies of.
// We have to go through these hoops because many places assume the Steps * We have to go through these hoops because many places assume the Steps
// pointers don't change - even though there are other ways they can change, * pointers don't change - even though there are other ways they can change,
// such as deleting a Steps via the editor. * such as deleting a Steps via the editor. */
for( vector<Steps*>::const_iterator itOld = vOldSteps.begin(); itOld != vOldSteps.end(); ++itOld ) for( vector<Steps*>::const_iterator itOld = vOldSteps.begin(); itOld != vOldSteps.end(); ++itOld )
{ {
StepsID id; StepsID id;
@@ -512,12 +516,18 @@ void Song::TidyUpData( bool bFromCache )
else // ! HasMusic() else // ! HasMusic()
{ {
m_fMusicLengthSeconds = 100; // guess m_fMusicLengthSeconds = 100; // guess
LOG->UserLog( "Song", GetSongDir(), "has no music file; guessing at %f seconds", m_fMusicLengthSeconds ); LOG->UserLog("Song",
GetSongDir(),
"has no music file; guessing at %f seconds",
m_fMusicLengthSeconds);
} }
if( m_fMusicLengthSeconds < 0 ) if( m_fMusicLengthSeconds < 0 )
{ {
LOG->UserLog( "Sound file", GetMusicPath(), "has a negative length %f.", m_fMusicLengthSeconds ); LOG->UserLog("Sound file",
GetMusicPath(),
"has a negative length %f.",
m_fMusicLengthSeconds);
m_fMusicLengthSeconds = 0; m_fMusicLengthSeconds = 0;
} }
@@ -530,7 +540,7 @@ void Song::TidyUpData( bool bFromCache )
/* Generate these before we autogen notes, so the new notes can inherit /* Generate these before we autogen notes, so the new notes can inherit
* their source's values. */ * their source's values. */
ReCalculateRadarValuesAndLastBeat( bFromCache ); ReCalculateRadarValuesAndLastSecond( bFromCache );
Trim( m_sMainTitle ); Trim( m_sMainTitle );
Trim( m_sSubTitle ); Trim( m_sSubTitle );
@@ -538,7 +548,8 @@ void Song::TidyUpData( bool bFromCache )
// Fall back on the song directory name. // Fall back on the song directory name.
if( m_sMainTitle == "" ) if( m_sMainTitle == "" )
NotesLoader::GetMainAndSubTitlesFromFullTitle( Basename(this->GetSongDir()), m_sMainTitle, m_sSubTitle ); NotesLoader::GetMainAndSubTitlesFromFullTitle(Basename(this->GetSongDir()),
m_sMainTitle, m_sSubTitle );
if( m_sArtist == "" ) if( m_sArtist == "" )
m_sArtist = "Unknown artist"; m_sArtist = "Unknown artist";
@@ -652,7 +663,8 @@ void Song::TidyUpData( bool bFromCache )
m_sLyricsFile = arrayLyricFiles[0]; m_sLyricsFile = arrayLyricFiles[0];
} }
// Now, For the images we still haven't found, look at the image dimensions of the remaining unclassified images. /* Now, For the images we still haven't found,
* look at the image dimensions of the remaining unclassified images. */
vector<RString> arrayImages; vector<RString> arrayImages;
GetImageDirListing( m_sSongDir + "*", arrayImages ); GetImageDirListing( m_sSongDir + "*", arrayImages );
@@ -763,7 +775,12 @@ void Song::TidyUpData( bool bFromCache )
/* Use this->GetBeatFromElapsedTime(0) instead of 0 to start when the /* Use this->GetBeatFromElapsedTime(0) instead of 0 to start when the
* music starts. */ * music starts. */
if( arrayPossibleMovies.size() == 1 ) if( arrayPossibleMovies.size() == 1 )
this->AddBackgroundChange( BACKGROUND_LAYER_1, BackgroundChange(0,arrayPossibleMovies[0],"",1.f,SBE_StretchNoLoop) ); this->AddBackgroundChange(BACKGROUND_LAYER_1,
BackgroundChange(0,
arrayPossibleMovies[0],
"",
1.f,
SBE_StretchNoLoop));
} }
@@ -836,12 +853,14 @@ void Song::TranslateTitles()
static TitleSubst tsub("Songs"); static TitleSubst tsub("Songs");
TitleFields title; TitleFields title;
title.LoadFromStrings( m_sMainTitle, m_sSubTitle, m_sArtist, m_sMainTitleTranslit, m_sSubTitleTranslit, m_sArtistTranslit ); title.LoadFromStrings(m_sMainTitle, m_sSubTitle, m_sArtist,
m_sMainTitleTranslit, m_sSubTitleTranslit, m_sArtistTranslit );
tsub.Subst( title ); tsub.Subst( title );
title.SaveToStrings( m_sMainTitle, m_sSubTitle, m_sArtist, m_sMainTitleTranslit, m_sSubTitleTranslit, m_sArtistTranslit ); title.SaveToStrings(m_sMainTitle, m_sSubTitle, m_sArtist,
m_sMainTitleTranslit, m_sSubTitleTranslit, m_sArtistTranslit );
} }
void Song::ReCalculateRadarValuesAndLastBeat( bool bFromCache ) void Song::ReCalculateRadarValuesAndLastSecond( bool bFromCache )
{ {
if( bFromCache && this->GetFirstSecond() >= 0 && this->GetLastSecond() > 0 ) if( bFromCache && this->GetFirstSecond() >= 0 && this->GetLastSecond() > 0 )
{ {
@@ -852,7 +871,8 @@ void Song::ReCalculateRadarValuesAndLastBeat( bool bFromCache )
} }
float localFirst = FLT_MAX; // inf float localFirst = FLT_MAX; // inf
float localLast = this->specifiedLastSecond; // Make sure we're at least as long as the specified amount. // Make sure we're at least as long as the specified amount below.
float localLast = this->specifiedLastSecond;
for( unsigned i=0; i<m_vpSteps.size(); i++ ) for( unsigned i=0; i<m_vpSteps.size(); i++ )
{ {
@@ -915,7 +935,7 @@ void Song::Save()
{ {
LOG->Trace( "Song::SaveToSongFile()" ); LOG->Trace( "Song::SaveToSongFile()" );
ReCalculateRadarValuesAndLastBeat(); ReCalculateRadarValuesAndLastSecond();
TranslateTitles(); TranslateTitles();
// TODO: Figure out a better way to save to Song's timing data. // TODO: Figure out a better way to save to Song's timing data.
@@ -1222,14 +1242,26 @@ bool Song::HasMusic() const
return m_sMusicFile != "" && IsAFile(GetMusicPath()); return m_sMusicFile != "" && IsAFile(GetMusicPath());
} }
bool Song::HasBanner() const {return m_sBannerFile != "" && IsAFile(GetBannerPath()); } bool Song::HasBanner() const
{
return m_sBannerFile != "" && IsAFile(GetBannerPath());
}
bool Song::HasInstrumentTrack( InstrumentTrack it ) const bool Song::HasInstrumentTrack( InstrumentTrack it ) const
{ {
return m_sInstrumentTrackFile[it] != "" && IsAFile(GetInstrumentTrackPath(it)); return m_sInstrumentTrackFile[it] != "" && IsAFile(GetInstrumentTrackPath(it));
} }
bool Song::HasLyrics() const {return m_sLyricsFile != "" && IsAFile(GetLyricsPath()); } bool Song::HasLyrics() const
bool Song::HasBackground() const {return m_sBackgroundFile != "" && IsAFile(GetBackgroundPath()); } {
bool Song::HasCDTitle() const {return m_sCDTitleFile != "" && IsAFile(GetCDTitlePath()); } return m_sLyricsFile != "" && IsAFile(GetLyricsPath());
}
bool Song::HasBackground() const
{
return m_sBackgroundFile != "" && IsAFile(GetBackgroundPath());
}
bool Song::HasCDTitle() const
{
return m_sCDTitleFile != "" && IsAFile(GetCDTitlePath());
}
bool Song::HasBGChanges() const bool Song::HasBGChanges() const
{ {
FOREACH_BackgroundLayer( i ) FOREACH_BackgroundLayer( i )
@@ -1526,16 +1558,46 @@ bool Song::IsMarathon() const
class LunaSong: public Luna<Song> class LunaSong: public Luna<Song>
{ {
public: public:
static int GetDisplayFullTitle( T* p, lua_State *L ) { lua_pushstring(L, p->GetDisplayFullTitle() ); return 1; } static int GetDisplayFullTitle( T* p, lua_State *L )
static int GetTranslitFullTitle( T* p, lua_State *L ) { lua_pushstring(L, p->GetTranslitFullTitle() ); return 1; } {
static int GetDisplayMainTitle( T* p, lua_State *L ) { lua_pushstring(L, p->GetDisplayMainTitle() ); return 1; } lua_pushstring(L, p->GetDisplayFullTitle() ); return 1;
static int GetTranslitMainTitle( T* p, lua_State *L ) { lua_pushstring(L, p->GetTranslitMainTitle() ); return 1; } }
static int GetDisplaySubTitle( T* p, lua_State *L ) { lua_pushstring(L, p->GetDisplaySubTitle() ); return 1; } static int GetTranslitFullTitle( T* p, lua_State *L )
static int GetTranslitSubTitle( T* p, lua_State *L ) { lua_pushstring(L, p->GetTranslitSubTitle() ); return 1; } {
static int GetDisplayArtist( T* p, lua_State *L ) { lua_pushstring(L, p->GetDisplayArtist() ); return 1; } lua_pushstring(L, p->GetTranslitFullTitle() ); return 1;
static int GetTranslitArtist( T* p, lua_State *L ) { lua_pushstring(L, p->GetTranslitArtist() ); return 1; } }
static int GetGenre( T* p, lua_State *L ) { lua_pushstring(L, p->m_sGenre ); return 1; } static int GetDisplayMainTitle( T* p, lua_State *L )
static int GetOrigin( T* p, lua_State *L ) { lua_pushstring(L, p->m_sOrigin ); return 1; } {
lua_pushstring(L, p->GetDisplayMainTitle() ); return 1;
}
static int GetTranslitMainTitle( T* p, lua_State *L )
{
lua_pushstring(L, p->GetTranslitMainTitle() ); return 1;
}
static int GetDisplaySubTitle( T* p, lua_State *L )
{
lua_pushstring(L, p->GetDisplaySubTitle() ); return 1;
}
static int GetTranslitSubTitle( T* p, lua_State *L )
{
lua_pushstring(L, p->GetTranslitSubTitle() ); return 1;
}
static int GetDisplayArtist( T* p, lua_State *L )
{
lua_pushstring(L, p->GetDisplayArtist() ); return 1;
}
static int GetTranslitArtist( T* p, lua_State *L )
{
lua_pushstring(L, p->GetTranslitArtist() ); return 1;
}
static int GetGenre( T* p, lua_State *L )
{
lua_pushstring(L, p->m_sGenre ); return 1;
}
static int GetOrigin( T* p, lua_State *L )
{
lua_pushstring(L, p->m_sOrigin ); return 1;
}
static int GetAllSteps( T* p, lua_State *L ) static int GetAllSteps( T* p, lua_State *L )
{ {
const vector<Steps*> &v = p->GetAllSteps(); const vector<Steps*> &v = p->GetAllSteps();
@@ -1549,9 +1611,29 @@ public:
LuaHelpers::CreateTableFromArray<Steps*>( v, L ); LuaHelpers::CreateTableFromArray<Steps*>( v, L );
return 1; return 1;
} }
static int GetSongDir( T* p, lua_State *L ) { lua_pushstring(L, p->GetSongDir() ); return 1; } static int GetSongDir( T* p, lua_State *L )
static int GetMusicPath( T* p, lua_State *L ) { RString s = p->GetMusicPath(); if( s.empty() ) return 0; lua_pushstring(L, s); return 1; } {
static int GetBannerPath( T* p, lua_State *L ) { RString s = p->GetBannerPath(); if( s.empty() ) return 0; LuaHelpers::Push(L, s); return 1; } lua_pushstring(L, p->GetSongDir() );
return 1;
}
static int GetMusicPath( T* p, lua_State *L )
{
RString s = p->GetMusicPath();
if( !s.empty() )
lua_pushstring(L, s);
else
lua_pushnil(L);
return 1;
}
static int GetBannerPath( T* p, lua_State *L )
{
RString s = p->GetBannerPath();
if( !s.empty() )
lua_pushstring(L, s);
else
lua_pushnil(L);
return 1;
}
static int GetBackgroundPath( T* p, lua_State *L ) static int GetBackgroundPath( T* p, lua_State *L )
{ {
RString s = p->GetBackgroundPath(); RString s = p->GetBackgroundPath();
@@ -1561,15 +1643,59 @@ public:
lua_pushnil(L); lua_pushnil(L);
return 1; return 1;
} }
static int GetCDTitlePath( T* p, lua_State *L ) { RString s = p->GetCDTitlePath(); if( s.empty() ) return 0; LuaHelpers::Push(L, s); return 1; } static int GetCDTitlePath( T* p, lua_State *L )
static int GetLyricsPath( T* p, lua_State *L ) { RString s = p->GetLyricsPath(); if( s.empty() ) return 0; lua_pushstring(L, s); return 1; } {
static int GetSongFilePath( T* p, lua_State *L ) { lua_pushstring(L, p->GetSongFilePath() ); return 1; } RString s = p->GetCDTitlePath();
static int IsTutorial( T* p, lua_State *L ) { lua_pushboolean(L, p->IsTutorial()); return 1; } if( !s.empty() )
static int IsEnabled( T* p, lua_State *L ) { lua_pushboolean(L, p->GetEnabled()); return 1; } lua_pushstring(L, s);
static int GetGroupName( T* p, lua_State *L ) { lua_pushstring(L, p->m_sGroupName); return 1; } else
static int MusicLengthSeconds( T* p, lua_State *L ) { lua_pushnumber(L, p->m_fMusicLengthSeconds); return 1; } lua_pushnil(L);
static int IsLong( T* p, lua_State *L ) { lua_pushboolean(L, p->IsLong()); return 1; } return 1;
static int IsMarathon( T* p, lua_State *L ) { lua_pushboolean(L, p->IsMarathon()); return 1; } }
static int GetLyricsPath( T* p, lua_State *L )
{
RString s = p->GetLyricsPath();
if( !s.empty() )
lua_pushstring(L, s);
else
lua_pushnil(L);
return 1;
}
static int GetSongFilePath( T* p, lua_State *L )
{
lua_pushstring(L, p->GetSongFilePath() );
return 1;
}
static int IsTutorial( T* p, lua_State *L )
{
lua_pushboolean(L, p->IsTutorial());
return 1;
}
static int IsEnabled( T* p, lua_State *L )
{
lua_pushboolean(L, p->GetEnabled());
return 1;
}
static int GetGroupName( T* p, lua_State *L )
{
lua_pushstring(L, p->m_sGroupName);
return 1;
}
static int MusicLengthSeconds( T* p, lua_State *L )
{
lua_pushnumber(L, p->m_fMusicLengthSeconds);
return 1;
}
static int IsLong( T* p, lua_State *L )
{
lua_pushboolean(L, p->IsLong());
return 1;
}
static int IsMarathon( T* p, lua_State *L )
{
lua_pushboolean(L, p->IsMarathon());
return 1;
}
static int HasStepsType( T* p, lua_State *L ) static int HasStepsType( T* p, lua_State *L )
{ {
StepsType st = Enum::Check<StepsType>(L, 1); StepsType st = Enum::Check<StepsType>(L, 1);
@@ -1583,7 +1709,8 @@ public:
lua_pushboolean( L, p->HasStepsTypeAndDifficulty(st, dc) ); lua_pushboolean( L, p->HasStepsTypeAndDifficulty(st, dc) );
return 1; return 1;
} }
// TODO: HasStepsTypeAndDifficulty and GetOneSteps should be in a SongUtil Lua table and a method of Steps. /* TODO: HasStepsTypeAndDifficulty and GetOneSteps should be in
* a SongUtil Lua table and a method of Steps. */
static int GetOneSteps( T* p, lua_State *L ) static int GetOneSteps( T* p, lua_State *L )
{ {
StepsType st = Enum::Check<StepsType>(L, 1); StepsType st = Enum::Check<StepsType>(L, 1);
@@ -1601,14 +1728,42 @@ public:
return 1; return 1;
} }
// has functions // has functions
static int HasMusic( T* p, lua_State *L ) { lua_pushboolean(L, p->HasMusic()); return 1; } static int HasMusic( T* p, lua_State *L )
static int HasBanner( T* p, lua_State *L ) { lua_pushboolean(L, p->HasBanner()); return 1; } {
static int HasBackground( T* p, lua_State *L ) { lua_pushboolean(L, p->HasBackground()); return 1; } lua_pushboolean(L, p->HasMusic());
static int HasCDTitle( T* p, lua_State *L ) { lua_pushboolean(L, p->HasCDTitle()); return 1; } return 1;
static int HasBGChanges( T* p, lua_State *L ) { lua_pushboolean(L, p->HasBGChanges()); return 1; } }
static int HasLyrics( T* p, lua_State *L ) { lua_pushboolean(L, p->HasLyrics()); return 1; } static int HasBanner( T* p, lua_State *L )
{
lua_pushboolean(L, p->HasBanner());
return 1;
}
static int HasBackground( T* p, lua_State *L )
{
lua_pushboolean(L, p->HasBackground());
return 1;
}
static int HasCDTitle( T* p, lua_State *L )
{
lua_pushboolean(L, p->HasCDTitle());
return 1;
}
static int HasBGChanges( T* p, lua_State *L )
{
lua_pushboolean(L, p->HasBGChanges());
return 1;
}
static int HasLyrics( T* p, lua_State *L )
{
lua_pushboolean(L, p->HasLyrics());
return 1;
}
// functions that AJ loves // functions that AJ loves
static int HasSignificantBPMChangesOrStops( T* p, lua_State *L ) { lua_pushboolean(L, p->HasSignificantBpmChangesOrStops()); return 1; } static int HasSignificantBPMChangesOrStops( T* p, lua_State *L )
{
lua_pushboolean(L, p->HasSignificantBpmChangesOrStops());
return 1;
}
static int HasEdits( T* p, lua_State *L ) static int HasEdits( T* p, lua_State *L )
{ {
StepsType st = Enum::Check<StepsType>(L, 1); StepsType st = Enum::Check<StepsType>(L, 1);
@@ -1621,8 +1776,16 @@ public:
lua_pushboolean(L, p->IsEasy( st )); lua_pushboolean(L, p->IsEasy( st ));
return 1; return 1;
} }
static int GetStepsSeconds( T* p, lua_State *L ) { lua_pushnumber(L, p->GetStepsSeconds()); return 1; } static int GetStepsSeconds( T* p, lua_State *L )
static int NormallyDisplayed( T* p, lua_State *L ){ lua_pushboolean(L, p->NormallyDisplayed()); return 1; } {
lua_pushnumber(L, p->GetStepsSeconds());
return 1;
}
static int NormallyDisplayed( T* p, lua_State *L )
{
lua_pushboolean(L, p->NormallyDisplayed());
return 1;
}
static int GetFirstSecond(T* p, lua_State *L) static int GetFirstSecond(T* p, lua_State *L)
{ {
lua_pushnumber(L, p->GetFirstSecond()); lua_pushnumber(L, p->GetFirstSecond());
@@ -1643,7 +1806,11 @@ public:
lua_pushnumber(L, p->GetLastBeat()); lua_pushnumber(L, p->GetLastBeat());
return 1; return 1;
} }
static int HasAttacks( T* p, lua_State *L ) { lua_pushboolean(L, p->HasAttacks()); return 1; } static int HasAttacks( T* p, lua_State *L )
{
lua_pushboolean(L, p->HasAttacks());
return 1;
}
static int GetDisplayBpms( T* p, lua_State *L ) static int GetDisplayBpms( T* p, lua_State *L )
{ {
DisplayBpms temp; DisplayBpms temp;
+2 -2
View File
@@ -103,10 +103,10 @@ public:
void TidyUpData( bool bFromCache = false ); void TidyUpData( bool bFromCache = false );
/** /**
* @brief Get the new radar values, and determine the last beat at the same time. * @brief Get the new radar values, and determine the last second at the same time.
* *
* This is called by TidyUpData, after saving the Song. */ * This is called by TidyUpData, after saving the Song. */
void ReCalculateRadarValuesAndLastBeat( bool bFromCache = false ); void ReCalculateRadarValuesAndLastSecond( bool bFromCache = false );
/** /**
* @brief Translate any titles that aren't in english. * @brief Translate any titles that aren't in english.
* *
+1 -1
View File
@@ -372,7 +372,7 @@
EnableIntrinsicFunctions="true" EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1" FavorSizeOrSpeed="1"
AdditionalIncludeDirectories=".;&quot;..\extern\lua-5.1\src&quot;;ffmpeg\modern_working\include;BaseClasses;..\extern\jsoncpp\include;&quot;..\extern\glew-1.5.8\include&quot;;..\extern\pcre;&quot;..\extern\mad-0.15.1b&quot;;..\extern\libpng\include;..\extern\libjpeg;..\extern\zlib;..\extern\vorbis" AdditionalIncludeDirectories=".;&quot;..\extern\lua-5.1\src&quot;;ffmpeg\modern_working\include;BaseClasses;..\extern\jsoncpp\include;&quot;..\extern\glew-1.5.8\include&quot;;..\extern\pcre;&quot;..\extern\mad-0.15.1b&quot;;..\extern\libpng\include;..\extern\libjpeg;..\extern\zlib;..\extern\vorbis"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;WINDOWS;RELEASE;GLEW_STATIC" PreprocessorDefinitions="WIN32,NDEBUG,_WINDOWS,WINDOWS,RELEASE,GLEW_STATIC"
StringPooling="true" StringPooling="true"
MinimalRebuild="false" MinimalRebuild="false"
ExceptionHandling="0" ExceptionHandling="0"
+10 -4
View File
@@ -250,18 +250,24 @@ void SpeedSegment::SetUnit(const int i)
this->unit = static_cast<unsigned short>(i); this->unit = static_cast<unsigned short>(i);
} }
void SpeedSegment::Scale( int start, int length, int newLength ) void SpeedSegment::Scale( int start, int oldLength, int newLength )
{ {
if( GetUnit() == 0 ) if( GetUnit() == 0 )
{ {
// XXX: this function is duplicated, there should be a better way // XXX: this function is duplicated, there should be a better way
float startBeat = GetBeat(); float startBeat = GetBeat();
float endBeat = startBeat + GetLength(); float endBeat = startBeat + GetLength();
float newStartBeat = ScalePosition( NoteRowToBeat(start), NoteRowToBeat(length), NoteRowToBeat(newLength), startBeat ); float newStartBeat = ScalePosition(NoteRowToBeat(start),
float newEndBeat = ScalePosition( NoteRowToBeat(start), NoteRowToBeat(length), NoteRowToBeat(newLength), endBeat ); NoteRowToBeat(oldLength),
NoteRowToBeat(newLength),
startBeat);
float newEndBeat = ScalePosition(NoteRowToBeat(start),
NoteRowToBeat(oldLength),
NoteRowToBeat(newLength),
endBeat);
SetLength( newEndBeat - newStartBeat ); SetLength( newEndBeat - newStartBeat );
} }
TimingSegment<SpeedSegment>::Scale( start, length, newLength ); TimingSegment<SpeedSegment>::Scale( start, oldLength, newLength );
} }
bool SpeedSegment::operator<( const SpeedSegment &other ) const bool SpeedSegment::operator<( const SpeedSegment &other ) const