...I went this far back by mistake?

This commit is contained in:
Jason Felds
2011-07-06 13:45:37 -04:00
32 changed files with 765 additions and 194 deletions
+31 -1
View File
@@ -5,7 +5,37 @@ 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/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
+7 -4
View File
@@ -153,6 +153,7 @@
<Function name='SelectMusicOrCourse'/>
<Function name='SelectProfileKeys'/>
<Function name='Serialize'/>
<Function name='SetFail'/>
<Function name='SetGamePref'/>
<Function name='SetThemePref'/>
<Function name='SetUserPref'/>
@@ -579,6 +580,7 @@
<Function name='GetAllCharacters'/>
<Function name='GetCharacter'/>
<Function name='GetRandomCharacter'/>
<Function name='GetCharacterCount'/>
</Class>
<Class base='ActorFrame' name='ComboGraph'>
<Function name='Load'/>
@@ -932,6 +934,7 @@
<Function name='GetMines'/>
<Function name='GetMini'/>
<Function name='GetMirror'/>
<Function name='GetNoAttacks'/>
<Function name='GetNoFakes'/>
<Function name='GetNoHands'/>
<Function name='GetNoHolds'/>
@@ -1477,8 +1480,8 @@
<Function name='GetCode'/>
<Function name='GetCourse'/>
<Function name='GetDescription'/>
<Function name='GetRequirePassHardSteps'/>
<Function name='GetRequirePassChallengeSteps'/>
<Function name='GetRequirePassHardSteps'/>
<Function name='GetRequirement'/>
<Function name='GetSong'/>
<Function name='GetUnlockRewardType'/>
@@ -2130,9 +2133,9 @@
<Constant name='left' value='&apos;HorizAlign_Left&apos;'/>
<Constant name='middle' value='&apos;VertAlign_Middle&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;'/>
</Constants>
<Version>StepMania 5 v5.0 Preview 1a</Version>
<Date>2011-06-24</Date>
<Version>StepMania 5 v5.0 Preview 2</Version>
<Date>2011-07-04</Date>
</Lua>
+1
View File
@@ -400,6 +400,7 @@
$type='LuaOptionRow' or
$type='ActorDef' or
$type='chunk' or
$type='unsigned' or
$type='various'">
<span class="primitiveType">
<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'>
<!-- Global functions -->
<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=''>
[02 StageMods.lua]
</Function>
@@ -36,10 +39,10 @@
Returns the base name of file path.
</Function>
<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 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 name='Center1Player' theme='_fallback' return='bool' arguments=''>
[03 ProductivityHelpers.lua] Returns <code>true</code> if Center 1P is being used.
@@ -48,7 +51,8 @@
[03 Gameplay.lua]
</Function>
<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 name='CloseConnection' return='void' arguments=''>
Closes any connection to an online server.
@@ -59,6 +63,21 @@
<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.
</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=''>
[03 Gameplay.lua] Determines what TapNoteScore allows for continuing the combo.
</Function>
@@ -68,6 +87,12 @@
<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).
</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'>
Tries to connect to the server at <code>sAddress</code>.
</Function>
@@ -77,14 +102,23 @@
<Function name='DayOfYear' return='int' arguments=''>
Returns the current day of the year.
</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'>
[01 base.lua] "Override Lua's dofile to use our <Link function="loadfile">loadfile</Link>."
</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'>
[02 Utilities.lua] Find a key in <code>tab</code> with the given <code>value</code>.
</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 name='foreach_ordered' theme='_fallback' return='void' arguments='table t, function f'>
<code>func</code> takes a key and a value.
</Function>
<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).
@@ -98,6 +132,12 @@
<Function name='GetCustomDifficulty' return='string' arguments='StepsType st, Difficulty d, CourseType ct'>
Returns the corresponding CustomDifficulty string for a StepsType/Difficulty (/optional CourseType) combination.
</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'>
[03 EnvUtils2.lua] Returns the value of <code>name</code> from the Env table.
</Function>
@@ -113,21 +153,45 @@
<Function name='GetOSName' return='string' arguments=''>
Returns a string representing the name of the operating system being used. (e.g. "Windows", "Linux", "Mac, "Unknown")
</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'>
[03 ThemePrefs.lua] Returns <code>true</code> if player <code>pn</code> is using ProTiming.
</Function>
<Function name='GetRandomSongBackground' theme='_fallback' return='string' arguments=''>
[02 Utilities.lua] Returns a path to a random song background.
</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=''>
Returns the name of the currently connected server.
</Function>
<Function name='GetSongBackground' theme='_fallback' return='string' arguments=''>
[02 Utilities.lua] Returns a path to the current songs background.
</Function>
<Function name='GetTapPosition' theme='_fallback' return='float' arguments=''>
[03 Gameplay.lua]
</Function>
<Function name='GetThemeAspectRatio' return='float' arguments=''>
Returns the theme's aspect ratio.
</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'>
[03 UserPreferences2.lua] Themer-facing function for getting a user preference.
</Function>
@@ -140,9 +204,38 @@
<Function name='GetUserPrefN' theme='_fallback' return='float' arguments='string name'>
[03 UserPreferences2.lua] Themer-facing function for getting a user preference as a number.
</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=''>
Returns the current hour.
</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=''>
[03 ThemePrefs.lua] Initializes various user preferences.
</Function>
@@ -206,6 +299,12 @@
<Function name='Minute' return='int' arguments=''>
Returns the current Minute.
</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=''>
Returns the current month of the year.
</Function>
@@ -215,6 +314,20 @@
<Function name='MonthToString' return='string' arguments='Month m'>
Returns Month <code>m</code> as a string.
</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'>
[03 ProductivityHelpers.lua] Converts a PlayerNumber into a short string (e.g. "P1", "P2").
</Function>
@@ -233,6 +346,16 @@
<Function name='ProductVersion' return='string' arguments=''>
Returns the product version.
</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'>
[02 ActorDef.lua]
</Function>
@@ -242,12 +365,27 @@
<Function name='ReadPrefFromFile' theme='_fallback' return='string' arguments='string prefName'>
[03 UserPreferences2.lua] (internal) Reads the specified user preference from its config file.
</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'>
[02 Utilities.lua] Round a number.
</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=''>
[03 Gameplay.lua] Returns the primary ScoreKeeper class to use.
</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=''>
Returns the current second.
</Function>
@@ -269,12 +407,20 @@
<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).
</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=''>
[02 Branches.lua] Determines the correct music/course selection screen to use and returns it.
</Function>
<Function name='SelectProfileKeys' theme='_fallback' return='string' arguments=''>
[03 Gameplay.lua] (soon to be deprecated) Returns a list of codes to use on ScreenSelectProfile.
</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'>
[03 EnvUtils2.lua] Sets the value of <code>name</code> to <code>value</code> in the Env table.
</Function>
@@ -299,6 +445,12 @@
<Function name='StandardDecorationFromFileOptional' theme='_fallback' return='Actor' arguments='string sMetricsName, string sFileName'>
[02 ActorDef.lua]
</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'>
[02 Utilities.lua] Look up each value in a table, returning a table with the resulting strings.
</Function>
@@ -308,42 +460,64 @@
<Function name='tobool' theme='_fallback' return='bool' arguments='various v'>
[03 ProductivityHelpers.lua] Converts a string or number to a bool.
</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'>
[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 name='Trace' theme='_fallback' return='void' arguments='string sString'>
[00 init.lua] Alias for <Link class='lua' function='Trace' />.
</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'>
Returns a string with characters escaped for URLs. (e.g. a space becomes '%20')
</Function>
<Function name='Var' theme='_fallback' return='ThreadVariable' arguments=''>
[01 base.lua] Alias for <Link class="lua" function="GetThreadVariable">lua.GetThreadVariable</Link>.
</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'>
[00 init.lua] Alias for <Link class='lua' function='Warn' />.
</Function>
<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).
</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'>
[02 ActorDef.lua] Wraps the children in an ActorFrame.
</Function>
<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>.
</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'>
[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 name='Year' return='int' arguments=''>
Returns the current year.
</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=''>
[03 ThemePrefs.lua] Returns a Lua option row for toggling AutoSetStyle.
</Function>
@@ -367,9 +541,16 @@
<!-- Namespaces -->
<Namespaces>
<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'>
Returns <code>true</code> if <code>sClassName</code> is a registered Class.
</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 name='Enum'>
<Description>
@@ -414,6 +595,20 @@
</Function>
</Namespace>
<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'>
Writes <code>sString</code> to log.txt. Aliased by
<Link class='GLOBAL' function='Trace' />.
@@ -422,9 +617,6 @@
Writes <code>sString</code> to info.txt and log.txt as
a warning. Aliased by <Link class='GLOBAL' function='Warn' />.
</Function>
<Function name='Flush' return='void' arguments='' >
Flushes log files to disk.
</Function>
</Namespace>
<Namespace name='RageFileUtil'>
<Function name='CreateRageFile' return='RageFile' arguments=''>
@@ -563,7 +755,21 @@
[02 Actor.lua]
</Function>
<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 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.
@@ -856,6 +1062,9 @@
<Function name='stopeffect' return='void' arguments=''>
Stops any effect the Actor has.
</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'>
Stretches the Actor to a rectangle of a specific size.
</Function>
@@ -880,6 +1089,12 @@
<Function name='z' return='void' arguments='float zPos'>
Set the z position of the Actor to <code>zPos</code>.
</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'>
Zooms the Actor to <code>zoom</code> scale.
</Function>
@@ -901,19 +1116,19 @@
<Function name='zoomz' return='void' arguments='float zoom'>
Zooms the Actor to <code>zoom</code> scale on the Z axis.
</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) -->
<Function name='bezier' theme='_fallback' return='void' arguments=''>
[02 Actor.lua]
</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=''>
[02 Actor.lua] Stretches an Actor to cover the screen. (equivalent to <code>stretchto,0,0,SCREEN_WIDTH,SCREEN_HEIGHT</code>)
</Function>
@@ -1166,7 +1381,7 @@
Loads the card image from the specified Character.
</Function>
<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 name='LoadFromCourse' return='void' arguments='Course c'>
Loads a Banner from a specified Course.
@@ -1325,6 +1540,9 @@
<Function name='GetRandomCharacter' return='Character' arguments=''>
Returns a random character.
</Function>
<Function name='GetCharacterCount' return='int' arguments=''>
Returns the number of characters available.
</Function>
</Class>
<Class name='ComboGraph'>
<Function name='Load' return='void' arguments='string sMetricsGroup'>
@@ -1455,6 +1673,9 @@
<Function name='MD5String' return='string' arguments='string s'>
Returns the MD5 hash for <code>s</code>.
</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'>
Returns the SHA-1 hash for <code>s</code>.
</Function>
@@ -2007,6 +2228,9 @@
</Function>
</Class>
<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=''>
Returns the number of lives remaining.
</Function>
@@ -2707,7 +2931,9 @@
</Function>
</Class>
<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='GetLocalProfileIDFromIndex' return='string' arguments='int iIndex' />
<Function name='GetLocalProfileIndexFromID' return='int' arguments='string sProfileID' />
@@ -2729,6 +2955,9 @@
<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).
</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'>
Returns <code>true</code> if the last load of player <code>pn</code>'s profile was a LastGood copy of the profile.
</Function>
@@ -2864,12 +3093,21 @@
<Function name='GetPrevScreenName' return='string' arguments=''>
Returns the name of the previous Screen.
</Function>
<Function name='GetScreenType' return='ScreenType' arguments=''>
Returns the ScreenType for this Screen.
</Function>
<Function name='lockinput' return='void' arguments='float f'>
Locks input for <code>f</code> seconds.
</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'>
Posts a message with the text <code>sScreenMsg</code> to the Screen.
</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 name='ScreenEdit'>
<Function name='GetEditState' return='EditState' arguments=''>
@@ -3340,6 +3578,9 @@
<Function name='LoadBanner' return='void' arguments='string sPath'>
Load the song banner texture at <code>sPath</code>.
</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'>
[02 Sprite.lua] Load the texture for <code>song</code>'s background.
</Function>
@@ -3352,6 +3593,9 @@
<Function name='SetEffectMode' return='void' arguments='EffectMode mode'>
Set the <Link class='ENUM' function='EffectMode' /> to <code>mode</code>.
</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'>
Set the texture to <code>texture</code>.
</Function>
@@ -3797,7 +4041,9 @@
<Function name='GetUnlockEntryIndexToCelebrate' return='int' arguments=''>
Returns the UnlockEntry index to celebrate.
</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'>
Unlocks an entry by ID.
</Function>
+2 -3
View File
@@ -15,10 +15,9 @@ return Def.ActorFrame {
--tap
NOTESKIN:LoadActor(Var "Button", "Ready Receptor")..{
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);
InitCommand=cmd(playcommand,"Tap");
InitCommand=cmd(pause;setstate,2;playcommand,"Tap");
HeldCommand=cmd(playcommand,"Tap");
ColumnJudgmentMessageCommand=cmd(playcommand,"Tap");
--TapNoneCommand=cmd(playcommand,"Tap");
@@ -25,7 +25,8 @@ local 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)",
"Jack Walstrom (FSX)",
}
@@ -39,9 +40,10 @@ local stepmania = {
local contrib = {
"Aldo Fregoso (Aldo_MX)", -- delays
"Chris Eldridge (kurisu)", -- dance-threepanel
"cerbo",
"cesarmades", -- pump/cmd* noteskins
"Chris Eldridge (kurisu)", -- dance-threepanel
"Christophe Goulet-LeBlanc (Kommisar)",
"corec", -- various fixes
"galopin", -- piu PlayStation2 usb mat support
"gholms", -- automake 1.11 support
@@ -49,9 +51,8 @@ local contrib = {
"Kaox", -- pump/default noteskin
"NitroX72", -- pump/frame noteskin
"sy567", -- beginner helper fix
"Thai Pangsakulyanont (theDtTvB)",
"v1toko", -- x-mode from StepNXA
"Christophe Goulet-LeBlanc (Kommisar)",
"waiei", -- custom scoring fixes + Hybrid scoring
}
local thanks = {
@@ -71,7 +72,7 @@ local thanks = {
local shoutout = {
"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",
"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
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

+3
View File
@@ -914,6 +914,7 @@ Insert=Insert
Insert Credit=Insert Credit
Insert beat and shift down=Insert beat and shift down
Insert Entry=Insert Entry
Invert notes' player=Invert player notes (routine only)
Jumps=Jumps
Key Joy Mappings=Config Key/Joy Mappings
Language=Language
@@ -931,6 +932,8 @@ MenuTimer=Menu Timer
Meter=Meter
Min BPM=Min Specified BPM
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
More Options=More Options
MovieColorDepth=Movie Color
+14 -19
View File
@@ -200,8 +200,8 @@ DrunkOffsetFrequency=10
DrunkArrowMagnitude=0.5
BeatOffsetHeight=15
BeatPIHeight=2
MiniPercentBase=0.5
MiniPercentGate=1
TinyPercentBase=0.5
TinyPercentGate=1
DizzyHoldHeads=false
QuantizeArrowYPosition=false
@@ -2199,22 +2199,23 @@ Accel,5="mod,boomerang;name,Boomerang"
# Accel,5="mod,expand;name,Expand"
# 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"
Effect,1="mod,drunk;name,Drunk"
Effect,2="mod,dizzy;name,Dizzy"
Effect,3="mod,twirl;name,Twirl"
Effect,4="mod,roll;name,Roll"
Effect,5="mod,confusion;name,Confusion"
Effect,6="mod,tiny;name,Tiny"
Effect,7="mod,-100% mini;name,Big"
Effect,8="mod,flip;name,Flip"
Effect,9="mod,invert;name,Invert"
Effect,10="mod,tornado;name,Tornado"
Effect,11="mod,tipsy;name,Tipsy"
Effect,12="mod,bumpy;name,Bumpy"
Effect,13="mod,beat;name,Beat"
Effect,14="mod,45% xmode;name,XMode"
Effect,6="mod,mini;name,Mini"
Effect,7="mod,tiny;name,Tiny"
Effect,8="mod,-100% mini;name,Big"
Effect,9="mod,flip;name,Flip"
Effect,10="mod,invert;name,Invert"
Effect,11="mod,tornado;name,Tornado"
Effect,12="mod,tipsy;name,Tipsy"
Effect,13="mod,bumpy;name,Bumpy"
Effect,14="mod,beat;name,Beat"
Effect,15="mod,45% xmode;name,XMode"
EffectsReceptor="selectmultiple"
EffectsReceptorDefault=""
@@ -2388,12 +2389,6 @@ Persp,3="mod,space;name,Space"
Persp,4="mod,hallway;name,Hallway"
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
# LifeType="3;together"
LifeType=(GAMESTATE:IsCourseMode() and 3 or 2)..";together"
@@ -3659,7 +3654,7 @@ SelectionBeatBeginFormat="%s:\n %.6f"
SelectionBeatUnfinishedFormat=" ...\n"
SelectionBeatEndFormat="-%.6f\n"
DifficultyFormat="%s:\n %s\n"
RoutinePlayerFormat="%s:\n %d\n"
RoutinePlayerFormat="%s: %d\n"
DescriptionFormat="%s:\n %s\n"
StepAuthorFormat="%s:\n %s\n"
ChartStyleFormat="%s:\n %s\n"
@@ -40,9 +40,10 @@ local stepmania = {
local contrib = {
"Aldo Fregoso (Aldo_MX)", -- delays
"Chris Eldridge (kurisu)", -- dance-threepanel
"cerbo",
"cesarmades", -- pump/cmd* noteskins
"Chris Eldridge (kurisu)", -- dance-threepanel
"Christophe Goulet-LeBlanc (Kommisar)",
"corec", -- various fixes
"galopin", -- piu PlayStation2 usb mat support
"gholms", -- automake 1.11 support
@@ -50,9 +51,8 @@ local contrib = {
"Kaox", -- pump/default noteskin
"NitroX72", -- pump/frame noteskin
"sy567", -- beginner helper fix
"Thai Pangsakulyanont (theDtTvB)",
"v1toko", -- x-mode from StepNXA
"Christophe Goulet-LeBlanc (Kommisar)",
"waiei", -- custom scoring fixes + Hybrid scoring
}
local thanks = {
@@ -72,7 +72,7 @@ local thanks = {
local shoutout = {
"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
"NAKET Coder",
"Ciera Boyd", -- you bet your ass I'm putting my girlfriend in the credits
@@ -1 +1 @@
_blank
_CombinedLifeMeterTug separator
@@ -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
function GetDefaultOptionLines()
local LineSets = {
"1,8,14,2,3,4,5,6,R,7,9,10,11,12,13,16,17,18", -- All
"1,8,14,2,7,13,16,17,18", -- DDR Essentials ( no turns, fx )
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", -- All
"1,8,14,2,7,13,16,17", -- DDR Essentials ( no turns, fx )
};
local function IsExtra()
if GAMESTATE:IsExtraStage() or GAMESTATE:IsExtraStage2() then
@@ -242,15 +242,22 @@ function GetDefaultOptionLines()
return false
end
end
if not IsExtra() then
if GetUserPrefB("UserPrefShowLotsaOptions") then
return GetUserPrefB("UserPrefShowLotsaOptions") and LineSets[1] or LineSets[2];
else
return LineSets[2]; -- Just make sure!
local function CheckCharacters(mods)
if CHARMAN:GetCharacterCount() > 0 then
return mods .. ",18"; --TODO: Better line name.
end
else
return "1,8,14,2,7,13,16,17,18" -- "failsafe" list
return mods;
end
modLines = LineSets[2];
if not IsExtra() then
modLines = GetUserPrefB("UserPrefShowLotsaOptions")
and LineSets[1] or LineSets[2];
end
return CheckCharacters(modLines);
end;
function UserPrefAutoSetStyle()
+1
View File
@@ -173,6 +173,7 @@ my @files = (
"NoteSkins/pump/default",
"NoteSkins/pump/frame5p",
"NoteSkins/pump/newextra",
"NoteSkins/pump/pad",
"NoteSkins/pump/rhythm",
"NoteSkins/pump/simple",
# kb7 noteskins
+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> BEAT_OFFSET_HEIGHT( "ArrowEffects", "BeatOffsetHeight" );
static ThemeMetric<float> BEAT_PI_HEIGHT( "ArrowEffects", "BeatPIHeight" );
static ThemeMetric<float> MINI_PERCENT_BASE( "ArrowEffects", "MiniPercentBase" );
static ThemeMetric<float> MINI_PERCENT_GATE( "ArrowEffects", "MiniPercentGate" );
static ThemeMetric<float> TINY_PERCENT_BASE( "ArrowEffects", "TinyPercentBase" );
static ThemeMetric<float> TINY_PERCENT_GATE( "ArrowEffects", "TinyPercentGate" );
static ThemeMetric<bool> DIZZY_HOLD_HEADS( "ArrowEffects", "DizzyHoldHeads" );
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 )
{
// XXX: Hack: we need to scale the reverse shift by the zoom.
float fTinyPercent = pPlayerState->m_PlayerOptions.GetCurrent().m_fEffects[PlayerOptions::EFFECT_TINY];
float fZoom = 1 - fTinyPercent*0.5f;
float fMiniPercent = pPlayerState->m_PlayerOptions.GetCurrent().m_fEffects[PlayerOptions::EFFECT_MINI];
float fZoom = 1 - fMiniPercent*0.5f;
// don't divide by 0
if( fabsf(fZoom) < 0.01 )
@@ -489,12 +489,12 @@ float ArrowEffects::GetXPos( const PlayerState* pPlayerState, int iColNum, float
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.
float fMiniPercent = fEffects[PlayerOptions::EFFECT_MINI];
fMiniPercent = min( powf(MINI_PERCENT_BASE, fMiniPercent), (float)MINI_PERCENT_GATE );
fPixelOffsetFromCenter *= fMiniPercent;
// Allow Tiny to pull tracks together, but not to push them apart.
float fTinyPercent = fEffects[PlayerOptions::EFFECT_TINY];
fTinyPercent = min( powf(TINY_PERCENT_BASE, fTinyPercent), (float)TINY_PERCENT_GATE );
fPixelOffsetFromCenter *= fTinyPercent;
}
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
* 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;
return CENTER_LINE_Y / fZoom;
}
@@ -741,11 +741,11 @@ float ArrowEffects::GetZoom( const PlayerState* pPlayerState )
(GAMESTATE->GetNumSidesJoined()==2 || GAMESTATE->AnyPlayersAreCpu()) )
fZoom *= 0.6f;
float fMiniPercent = pPlayerState->m_PlayerOptions.GetCurrent().m_fEffects[PlayerOptions::EFFECT_MINI];
if( fMiniPercent != 0 )
float fTinyPercent = pPlayerState->m_PlayerOptions.GetCurrent().m_fEffects[PlayerOptions::EFFECT_TINY];
if( fTinyPercent != 0 )
{
fMiniPercent = powf( 0.5f, fMiniPercent );
fZoom *= fMiniPercent;
fTinyPercent = powf( 0.5f, fTinyPercent );
fZoom *= fTinyPercent;
}
return fZoom;
}
+9 -1
View File
@@ -89,7 +89,7 @@ Character* CharacterManager::GetDefaultCharacter()
}
/* We always have the default character. */
ASSERT(0);
FAIL_M("There must be a default character available!");
return NULL;
}
@@ -152,6 +152,13 @@ public:
LuaHelpers::CreateTableFromArray(vChars, L);
return 1;
}
static int GetCharacterCount(T* p, lua_State *L)
{
vector<Character*> chars;
p->GetCharacters(chars);
lua_pushnumber(L, chars.size());
return 1;
}
LunaCharacterManager()
{
@@ -159,6 +166,7 @@ public:
// sm-ssc adds:
ADD_METHOD( GetRandomCharacter );
ADD_METHOD( GetAllCharacters );
ADD_METHOD( GetCharacterCount );
}
};
+7 -2
View File
@@ -1,19 +1,24 @@
/* CharacterManager - Manage characters. */
#ifndef CHARACTER_MANAGER_H
#define CHARACTER_MANAGER_H
class Character;
struct lua_State;
/** @brief Manage all of the Characters. */
class CharacterManager
{
public:
/** @brief Set up the character manager. */
CharacterManager();
/** @brief Destroy the character manager. */
~CharacterManager();
void GetCharacters( vector<Character*> &vpCharactersOut );
/** @brief Get one installed character at random.
* @return The random character. */
Character* GetRandomCharacter();
/** @brief Get the character assigned as the default.
* @return The default character. */
Character* GetDefaultCharacter();
Character* GetCharacterFromID( RString sCharacterID );
+17 -12
View File
@@ -332,7 +332,7 @@ static const Style g_Style_Dance_Couple_Edit =
false, // m_bUsedForHowToPlay
"couple-edit", // m_szName
StepsType_dance_couple, // m_StepsType
StyleType_OnePlayerOneSide, // m_StyleType
StyleType_OnePlayerTwoSides, // m_StyleType
8, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -357,8 +357,8 @@ static const Style g_Style_Dance_Couple_Edit =
},
},
{ // m_iInputColumn[NUM_GameController][NUM_GameButton]
{ 0, 1, 2, 3, 4, 5, 6, 7, Style::END_MAPPING },
{ 0, 1, 2, 3, 4, 5, 6, 7, Style::END_MAPPING },
{ 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
@@ -770,7 +770,7 @@ static const Style g_Style_Pump_Couple_Edit =
false, // m_bUsedForHowToPlay
"couple-edit", // m_szName
StepsType_pump_couple, // m_StepsType
StyleType_OnePlayerOneSide, // m_StyleType
StyleType_OnePlayerTwoSides, // m_StyleType
10, // m_iColsPerPlayer
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
{ // PLAYER_1
@@ -786,19 +786,24 @@ static const Style g_Style_Pump_Couple_Edit =
{ TRACK_10, +PUMP_COL_SPACING*5.0f+4, NULL },
},
{ // PLAYER_2
{ TRACK_1, -PUMP_COL_SPACING*2.0f, NULL },
{ TRACK_2, -PUMP_COL_SPACING*1.0f, NULL },
{ TRACK_3, +PUMP_COL_SPACING*0.0f, NULL },
{ TRACK_4, +PUMP_COL_SPACING*1.0f, NULL },
{ TRACK_5, +PUMP_COL_SPACING*2.0f, NULL },
{ TRACK_1, -PUMP_COL_SPACING*5.0f-4, NULL },
{ TRACK_2, -PUMP_COL_SPACING*4.0f-4, NULL },
{ TRACK_3, -PUMP_COL_SPACING*3.0f-4, NULL },
{ TRACK_4, -PUMP_COL_SPACING*2.0f-4, 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]
{ 1, 3, 2, 0, 4, 6, 8, 7, 5, 9, Style::END_MAPPING },
{ 1, 3, 2, 0, 4, 6, 8, 7, 5, 9, Style::END_MAPPING },
{ 1, 3, 2, 0, 4, Style::END_MAPPING },
{ 6, 8, 7, 5, 9, Style::END_MAPPING },
},
{ // 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_bCanUseBeginnerHelper
+1 -1
View File
@@ -817,7 +817,7 @@ void NoteField::DrawPrimitives()
float fDrawScale = 1;
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);
iDrawDistanceBeforeTargetsPixels = (int)(iDrawDistanceBeforeTargetsPixels * fDrawScale);
+2 -2
View File
@@ -867,7 +867,7 @@ void Player::Update( float fDeltaTime )
Actor::TweenState::MakeWeightedAverage( m_pActorWithComboPosition->DestTweenState(), ts1, ts2, fPercentCentered );
}
float fNoteFieldZoom = 1 - fTinyPercent*0.5f;
float fNoteFieldZoom = 1 - fMiniPercent*0.5f;
if( m_pNoteField )
m_pNoteField->SetZoom( fNoteFieldZoom );
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 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 )
fZoom *= SCALE( fTilt, 0.f, 1.f, 1.f, 0.9f );
else
+1 -1
View File
@@ -61,7 +61,7 @@ void PlayerOptions::Approach( const PlayerOptions& other, float fDeltaSeconds )
APPROACH( fTimeSpacing );
APPROACH( fScrollSpeed );
APPROACH( fMaxScrollBPM );
//APPROACH( fMaxScrollBPM );
fapproach( m_fScrollBPM, other.m_fScrollBPM, fDeltaSeconds * other.m_SpeedfScrollBPM*150 );
for( int i=0; i<NUM_ACCELS; i++ )
APPROACH( fAccels[i] );
+2 -2
View File
@@ -7,10 +7,10 @@
!define PRODUCT_ID "StepMania"
!define PRODUCT_VER "v5.0 Preview 2"
!define PRODUCT_DISPLAY "${PRODUCT_ID} ${PRODUCT_VER}"
!define PRODUCT_BITMAP "ssc"
!define PRODUCT_BITMAP "sm5"
!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_INTERNAL_PCKS
+1 -1
View File
@@ -92,7 +92,7 @@ int MersenneTwister::operator()()
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 )
return;
float fDelta = other_val - val;
+85 -4
View File
@@ -568,6 +568,12 @@ static MenuDef g_AlterMenu(
MenuRowDef(ScreenEdit::convert_to_warp, "Convert selection to warp", true,
EditMode_Full, true, true, 0, NULL ),
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 )
);
@@ -1759,6 +1765,10 @@ void ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB )
}
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);
}
break;
@@ -2723,7 +2733,7 @@ void ScreenEdit::TransitionEditState( EditState em )
Steps* pSteps = GAMESTATE->m_pCurSteps[PLAYER_1];
ASSERT( pSteps );
pSteps->SetNoteData( m_NoteDataEdit );
m_pSong->ReCalculateRadarValuesAndLastBeat();
m_pSong->ReCalculateRadarValuesAndLastSecond();
m_Background.Unload();
m_Background.LoadFromSong( m_pSong );
@@ -3128,8 +3138,8 @@ void ScreenEdit::HandleScreenMessage( const ScreenMessage SM )
if (ScreenMiniMenu::s_iLastRowCode == ScreenEdit::remove )
{
ASSERT(iAttack >= 0);
attacks.erase(attacks.begin() + iAttack);
if (iAttack > 0)
attacks.erase(attacks.begin() + iAttack);
}
else
{
@@ -4059,7 +4069,78 @@ void ScreenEdit::HandleAlterMenuChoice(AlterMenuChoice c, const vector<int> &iAn
SetDirty(true);
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 ); }
MainMenuChoice m_CurrentAction;
/** @brief How does one alter a selection of NoteData? */
enum AlterMenuChoice
{
cut,
copy,
clear,
quantize,
turn,
transform,
alter,
tempo,
play,
record,
preview_designation,
convert_to_pause,
convert_to_delay,
convert_to_warp,
convert_to_fake,
cut, /**< Cut the notes. */
copy, /**< Copy the notes. */
clear, /**< Erase the notes, without putting them in the clipboard. */
quantize, /**< Sync the notes to an exact level. */
turn, /**< Rotate the notes. */
transform, /**< Activate a specific mod. */
alter, /**< Perform other transformations. */
tempo, /**< Modify the tempo of the notes. */
play, /**< Play the notes in the range. */
record, /**< Record new notes in the range. */
preview_designation, /**< Set the area as the music preview. */
convert_to_pause, /**< Convert the range into a StopSegment. */
convert_to_delay, /**< Convert the range into a DelaySegment. */
convert_to_warp, /**< Convert the range into a WarpSegment. */
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
};
+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_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_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 );
}
+224 -57
View File
@@ -283,7 +283,11 @@ bool Song::LoadFromSongDir( RString sDir )
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;
bool bLoadedFromSSC = loaderSSC.LoadFromSimfile( sCacheFilePath, *this, true );
if( !bLoadedFromSSC )
@@ -379,13 +383,13 @@ bool Song::ReloadFromSongDir( RString sDir )
FOREACH_ENUM( StepsType, i )
m_vpStepsByType[i].clear();
// 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
// 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.
// 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,
// such as deleting a Steps via the editor.
/* 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
* 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.
* 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,
* such as deleting a Steps via the editor. */
for( vector<Steps*>::const_iterator itOld = vOldSteps.begin(); itOld != vOldSteps.end(); ++itOld )
{
StepsID id;
@@ -512,12 +516,18 @@ void Song::TidyUpData( bool bFromCache )
else // ! HasMusic()
{
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 )
{
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;
}
@@ -530,7 +540,7 @@ void Song::TidyUpData( bool bFromCache )
/* Generate these before we autogen notes, so the new notes can inherit
* their source's values. */
ReCalculateRadarValuesAndLastBeat( bFromCache );
ReCalculateRadarValuesAndLastSecond( bFromCache );
Trim( m_sMainTitle );
Trim( m_sSubTitle );
@@ -538,7 +548,8 @@ void Song::TidyUpData( bool bFromCache )
// Fall back on the song directory name.
if( m_sMainTitle == "" )
NotesLoader::GetMainAndSubTitlesFromFullTitle( Basename(this->GetSongDir()), m_sMainTitle, m_sSubTitle );
NotesLoader::GetMainAndSubTitlesFromFullTitle(Basename(this->GetSongDir()),
m_sMainTitle, m_sSubTitle );
if( m_sArtist == "" )
m_sArtist = "Unknown artist";
@@ -652,7 +663,8 @@ void Song::TidyUpData( bool bFromCache )
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;
GetImageDirListing( m_sSongDir + "*", arrayImages );
@@ -763,7 +775,12 @@ void Song::TidyUpData( bool bFromCache )
/* Use this->GetBeatFromElapsedTime(0) instead of 0 to start when the
* music starts. */
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");
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 );
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 )
{
@@ -852,7 +871,8 @@ void Song::ReCalculateRadarValuesAndLastBeat( bool bFromCache )
}
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++ )
{
@@ -915,7 +935,7 @@ void Song::Save()
{
LOG->Trace( "Song::SaveToSongFile()" );
ReCalculateRadarValuesAndLastBeat();
ReCalculateRadarValuesAndLastSecond();
TranslateTitles();
// 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());
}
bool Song::HasBanner() const {return m_sBannerFile != "" && IsAFile(GetBannerPath()); }
bool Song::HasBanner() const
{
return m_sBannerFile != "" && IsAFile(GetBannerPath());
}
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::HasBackground() const
{
return m_sBackgroundFile != "" && IsAFile(GetBackgroundPath());
}
bool Song::HasCDTitle() const
{
return m_sCDTitleFile != "" && IsAFile(GetCDTitlePath());
}
bool Song::HasLyrics() const {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
{
FOREACH_BackgroundLayer( i )
@@ -1526,16 +1558,46 @@ bool Song::IsMarathon() const
class LunaSong: public Luna<Song>
{
public:
static int GetDisplayFullTitle( T* p, lua_State *L ) { lua_pushstring(L, p->GetDisplayFullTitle() ); return 1; }
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; }
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 GetDisplayFullTitle( T* p, lua_State *L )
{
lua_pushstring(L, p->GetDisplayFullTitle() ); return 1;
}
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;
}
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 )
{
const vector<Steps*> &v = p->GetAllSteps();
@@ -1549,9 +1611,29 @@ public:
LuaHelpers::CreateTableFromArray<Steps*>( v, L );
return 1;
}
static int GetSongDir( T* p, lua_State *L ) { lua_pushstring(L, p->GetSongDir() ); return 1; }
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; }
static int GetSongDir( T* p, lua_State *L )
{
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 )
{
RString s = p->GetBackgroundPath();
@@ -1561,15 +1643,59 @@ public:
lua_pushnil(L);
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 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; }
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 GetCDTitlePath( T* p, lua_State *L )
{
RString s = p->GetCDTitlePath();
if( !s.empty() )
lua_pushstring(L, s);
else
lua_pushnil(L);
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 )
{
StepsType st = Enum::Check<StepsType>(L, 1);
@@ -1583,7 +1709,8 @@ public:
lua_pushboolean( L, p->HasStepsTypeAndDifficulty(st, dc) );
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 )
{
StepsType st = Enum::Check<StepsType>(L, 1);
@@ -1601,14 +1728,42 @@ public:
return 1;
}
// has functions
static int HasMusic( T* p, lua_State *L ) { lua_pushboolean(L, p->HasMusic()); 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; }
static int HasMusic( T* p, lua_State *L )
{
lua_pushboolean(L, p->HasMusic());
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
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 )
{
StepsType st = Enum::Check<StepsType>(L, 1);
@@ -1621,8 +1776,16 @@ public:
lua_pushboolean(L, p->IsEasy( st ));
return 1;
}
static int GetStepsSeconds( T* p, lua_State *L ) { lua_pushnumber(L, p->GetStepsSeconds()); return 1; }
static int NormallyDisplayed( T* p, lua_State *L ){ lua_pushboolean(L, p->NormallyDisplayed()); return 1; }
static int GetStepsSeconds( T* p, lua_State *L )
{
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)
{
lua_pushnumber(L, p->GetFirstSecond());
@@ -1643,7 +1806,11 @@ public:
lua_pushnumber(L, p->GetLastBeat());
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 )
{
DisplayBpms temp;
+2 -2
View File
@@ -103,10 +103,10 @@ public:
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. */
void ReCalculateRadarValuesAndLastBeat( bool bFromCache = false );
void ReCalculateRadarValuesAndLastSecond( bool bFromCache = false );
/**
* @brief Translate any titles that aren't in english.
*
+1 -1
View File
@@ -372,7 +372,7 @@
EnableIntrinsicFunctions="true"
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"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;WINDOWS;RELEASE;GLEW_STATIC"
PreprocessorDefinitions="WIN32,NDEBUG,_WINDOWS,WINDOWS,RELEASE,GLEW_STATIC"
StringPooling="true"
MinimalRebuild="false"
ExceptionHandling="0"
+10 -4
View File
@@ -250,18 +250,24 @@ void SpeedSegment::SetUnit(const int 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 )
{
// XXX: this function is duplicated, there should be a better way
float startBeat = GetBeat();
float endBeat = startBeat + GetLength();
float newStartBeat = ScalePosition( NoteRowToBeat(start), NoteRowToBeat(length), NoteRowToBeat(newLength), startBeat );
float newEndBeat = ScalePosition( NoteRowToBeat(start), NoteRowToBeat(length), NoteRowToBeat(newLength), endBeat );
float newStartBeat = ScalePosition(NoteRowToBeat(start),
NoteRowToBeat(oldLength),
NoteRowToBeat(newLength),
startBeat);
float newEndBeat = ScalePosition(NoteRowToBeat(start),
NoteRowToBeat(oldLength),
NoteRowToBeat(newLength),
endBeat);
SetLength( newEndBeat - newStartBeat );
}
TimingSegment<SpeedSegment>::Scale( start, length, newLength );
TimingSegment<SpeedSegment>::Scale( start, oldLength, newLength );
}
bool SpeedSegment::operator<( const SpeedSegment &other ) const