diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index 8454851334..b20b2f69a6 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -11,7 +11,6 @@ StepMania 5.0 alpha 1 | 201112xx 2011/12/27 ---------- * [MusicWheel] Add IsRouletting Lua binding. [AJ] -* [WheelBase] Add GetNumWheelItems Lua binding. [AJ] * [LuaManager] Remove GetOSName Lua binding; use GetArchName instead. [AJ] 2011/12/26 diff --git a/Docs/Luadoc/Lua.xml b/Docs/Luadoc/Lua.xml index 2bd63dce12..062cc2b248 100644 --- a/Docs/Luadoc/Lua.xml +++ b/Docs/Luadoc/Lua.xml @@ -10,7 +10,7 @@ - + @@ -55,7 +55,6 @@ - @@ -68,6 +67,8 @@ + + @@ -80,16 +81,14 @@ - - - + @@ -108,7 +107,6 @@ - @@ -129,6 +127,7 @@ + @@ -136,13 +135,11 @@ - - @@ -184,15 +181,11 @@ - - - - @@ -201,7 +194,6 @@ - @@ -678,6 +670,11 @@ + + + + + @@ -1019,6 +1016,8 @@ + + @@ -1142,6 +1141,7 @@ + @@ -1207,6 +1207,7 @@ + @@ -1681,6 +1682,7 @@ + @@ -1689,6 +1691,7 @@ + @@ -2285,6 +2288,8 @@ + + @@ -2301,9 +2306,8 @@ - - StepMania v5.0 Preview 4 - 2011-11-27 + StepMania v5.0 alpha 0 + 2011-12-29 diff --git a/Docs/Luadoc/LuaDocumentation.xml b/Docs/Luadoc/LuaDocumentation.xml index a1d032d7e3..7433636599 100644 --- a/Docs/Luadoc/LuaDocumentation.xml +++ b/Docs/Luadoc/LuaDocumentation.xml @@ -18,13 +18,18 @@ -> Basename() To add a link to an Enum: -> CoinMode + +save yourself some time, copy this for undocumented things: + + + --> - [03 HSV.lua] Returns a color with the specified alpha. + [02 Colors.lua] Returns a color with the specified alpha. [02 StageMods.lua] @@ -42,10 +47,10 @@ [02 Colors.lua] Boosts the specified color by multiplying its values by fBoost. - [03 HSV.lua] Modifies the brightness of the specified color. + [02 Colors.lua] Modifies the brightness of the specified color. - [03 ProductivityHelpers.lua] Returns true if Center 1P is being used. + [02 Utilities.lua] Returns true if Center 1P is being used. [03 Gameplay.lua] Returns true if checkpoint judgments and tap judgments @@ -55,6 +60,9 @@ CLAMP is an all-female Japanese mangaka group that formed in the mid 1980s. Erm, I mean... Clamps fValue between fLow and fHigh. + + [04 KeymapGuard.lua] + Closes any connection to an online server. @@ -74,10 +82,10 @@ [02 Colors.lua] Returns a midtone of the color. (Specifically c[1]/1.5, c[2]/1.5, c[3]/1.5, c[4]) - [03 HSV.lua] Returns a hex representation for the specified color. + [02 Colors.lua] Returns a hex representation for the specified color. - [03 HSV.lua] Takes in a color and returns a table with the HSV values. + [02 Colors.lua] Takes in a color and returns a table with the HSV values. [03 Gameplay.lua] Determines what TapNoteScore allows for continuing the combo. @@ -97,6 +105,15 @@ Tries to connect to the server at sAddress. + + [02 Colors.lua] + + + [02 Colors.lua] + + + [02 Colors.lua] + Returns the current day of the month. @@ -109,6 +126,12 @@ [01 base.lua] "Override Lua's dofile to use our loadfile." + + [03 Gameplay.lua] + + + [03 Gameplay.lua] + [02 Utilities.lua] @@ -124,12 +147,16 @@ Returns the number passed to the function followed by its suffix ("th", "nd", and so on). + Returns fPercentDancePoints formatted as a percentage. [03 Gameplay.lua] Returns a list of valid styles for the current gametype. + + [03 Gameplay.lua] + Returns the corresponding CustomDifficulty string for a StepsType/Difficulty (/optional CourseType) combination. @@ -155,7 +182,7 @@ Returns a string representing the name of the operating system being used. (e.g. "Windows", "Linux", "Mac, "Unknown") - [03 ProductivityHelpers.lua] "This returns a profile, preferably a player one. If there isn't one, [it falls] back on the machine profile." + [02 Utilities.lua] "This returns a profile, preferably a player one. If there isn't one, [it falls] back on the machine profile." [03 ThemePrefs.lua] Returns true if player pn is using ProTiming. @@ -164,10 +191,10 @@ [02 Utilities.lua] Returns a path to a random song background. - [03 ProductivityHelpers.lua] + [02 Actor.lua] - [03 ProductivityHelpers.lua] + [02 Actor.lua] Returns the display aspect ratio. @@ -190,6 +217,12 @@ Returns the current Timing difficulty. + + [01 alias.lua] + + + [01 alias.lua] + [04 Scoring.lua] "Retrieve the amount of taps/holds/rolls involved." Used in some scoring formulas. @@ -206,7 +239,7 @@ [03 UserPreferences2.lua] Themer-facing function for getting a user preference as a number. - [03 HSV.lua] Returns the color's alpha if it has any, otherwise returns 1. + [02 Colors.lua] Returns the color's alpha if it has any, otherwise returns 1. [03 Gameplay.lua] Returns the value to start showing the combo at. @@ -221,36 +254,39 @@ Returns the current hour. - [03 HSV.lua] Converts a color from HSV values to something StepMania can understand. + [02 Colors.lua] Converts a color from HSV values to something StepMania can understand. hue is from 0-360, saturation and value are 0..1 - [03 HSV.lua] Converts a color from HSV values with alpha to something StepMania can understand. + [02 Colors.lua] Converts a color from HSV values with alpha to something StepMania can understand. hue is from 0-360, saturation, value, and alpha are 0..1 - [03 HSV.lua] "Converts a set of HSV values to a color." + [02 Colors.lua] "Converts a set of HSV values to a color." - [03 HSV.lua] "Takes in a normal color and returns the hex representation. (Adapted from code in LuaBit)" + [02 Colors.lua] "Takes in a normal color and returns the hex representation. (Adapted from code in LuaBit)" - [03 HSV.lua] Changes the hue of the input color. + [02 Colors.lua] Changes the hue of the input color. [03 ThemePrefs.lua] Initializes various user preferences. - [03 ProductivityHelpers.lua] Returns true if the coin mode is not set to CoinMode_Home. + [02 Utilities.lua] Returns true if the coin mode is not set to CoinMode_Home. Returns true if Event Mode is turned on. - [03 ProductivityHelpers.lua] Returns true if Arcade and the coin mode is CoinMode_Free. + [02 Utilities.lua] Returns true if Arcade and the coin mode is CoinMode_Free. + + + [03 Gameplay.lua] Returns true if the current game is sGame. - [03 ProductivityHelpers.lua] Returns true if the coin mode is set to CoinMode_Home. + [02 Utilities.lua] Returns true if the coin mode is set to CoinMode_Home. Returns true if connected to the Internet. @@ -261,6 +297,9 @@ Returns true if Player pn is logged on to a SMOnline server. + + [04 Scoring.lua] Returns true if W1 is allowed (and tns == 'TapNoteScore_W2') + [02 Branches.lua] Returns true if Routine mode is being played. @@ -273,6 +312,12 @@ [02 Utilities.lua] Joins a table, splitting each item with delimiter, returning a string of the results. + + [02 Colors.lua] + + + [02 Colors.lua] + Returns an Actor definition for the actor at sPath. If sPath points to a Lua file, any additional arguments will be passed to that script. @@ -329,11 +374,17 @@ so that the construction for k,v in pairs(t) do body end will iterate over all key–value pairs of table t." + + [02 Colors.lua] + + + [02 Colors.lua] + - [03 ProductivityHelpers.lua] Converts a PlayerNumber into a short string (e.g. "P1", "P2"). + [02 Utilities.lua] Converts a PlayerNumber into a short string (e.g. "P1", "P2"). - [03 ProductivityHelpers.lua] Returns either p1val or p2val depending on pn. + [02 Actor.lua] Returns either p1val or p2val depending on pn. [00 init.lua] @@ -341,8 +392,11 @@ [03 ThemePrefs.lua] Prints a table's contents to the log. + + Returns the product family. (e.g. "StepMania") + - Returns the product ID. + Returns the product ID. (e.g. "StepMania 5") Returns the product version. @@ -375,8 +429,14 @@ [02 Utilities.lua] Round a number. + + [03 Gameplay.lua] Returns the routine noteskin for player . + + + [03 Gameplay.lua] Returns the routine noteskin for player 2. + - [03 HSV.lua] Modifies the saturation of the specified color + [02 Colors.lua] Modifies the saturation of the specified color [03 Gameplay.lua] Returns the primary ScoreKeeper class to use. @@ -428,6 +488,9 @@ [03 UserPreferences2.lua] Themer-facing function for setting a user preference. + + [03 Gameplay.lua] + [02 ActorDef.lua] Returns true if a decoration should be shown on the current screen or not. @@ -437,6 +500,12 @@ [02 Utilities.lua] Splits a string at every occurence of delimiter, returning a table of the results. + + [02 Colors.lua] + + + [02 Colors.lua] + [02 ActorDef.lua] @@ -459,7 +528,7 @@ [02 TextBanner.lua] This function defines how the TextBanner is laid out. - [03 ProductivityHelpers.lua] Converts a string or number to a bool. + [02 Utilities.lua] Converts a string or number to a bool. Tries to convert e to a number. Returns nil if @@ -686,6 +755,9 @@ Plays the commands that follow at an accelerated rate (fRate * fRate), where fRate is in seconds. + + Adds a command to the Actor. + Adds rot to the Actor's current x rotation. @@ -759,10 +831,10 @@ [02 Actor.lua] Centers an Actor on the screen. (equivalent to x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y) - [03 ProductivityHelpers.lua] Centers an Actor on the X axis. (equivalent to x,SCREEN_CENTER_X) + [02 Actor.lua] Centers an Actor on the X axis. (equivalent to x,SCREEN_CENTER_X) - [03 ProductivityHelpers.lua] Centers an Actor on the y axis. (equivalent to y,SCREEN_CENTER_Y) + [02 Actor.lua] Centers an Actor on the y axis. (equivalent to y,SCREEN_CENTER_Y) Determines if the z-buffer should be cleared or not. @@ -796,6 +868,9 @@ Sets the Actor's alpha level to fAlpha, where fAlpha is in the range 0..1. + + Makes the Actor switch between two colors immediately. + Sets the Actor's bottom edge color to c. @@ -811,9 +886,15 @@ Sets the Actor's lower right corner color to c. + + Makes the Actor switch between two colors, jumping back to the first after reaching the second. + Sets the Actor's right edge color to c. + + Makes the Actor shift between two colors smoothly. + Sets the Actor's top edge color to c. @@ -823,6 +904,9 @@ Sets the Actor's upper right corner color to c. + + Tells the Actor to draw itself. + Sets the Actor's draworder to iOrder, where larger values display first. @@ -913,6 +997,7 @@ Returns the Actor's current height. + Returns the Actor's current X rotation. @@ -943,12 +1028,19 @@ Sets the Actor's glow color. + + Makes the Actor glow between two colors immediately. + - + Makes the Actor glow between two colors smoothly, jumping back to the first at the end. + + + Makes the Actor glow between two colors smoothly. Set the fractional horizontal alignment of the Actor according to fAlign which should be a float in the range 0..1. An alignment of 0 is left aligned while an alignment of 1 is right aligned. See for the common case. + Hides the Actor for the specified amount of time. @@ -976,6 +1068,7 @@ Stops the Actor's movement. (Usually used for Sprites or Models.) + Starts the Actor's movement. (Usually used for Sprites or Models.) @@ -997,6 +1090,7 @@ Makes the Actor change colors continually using colors of the rainbow. + Set the Actor's rotation on the X axis to fAlign. @@ -1006,6 +1100,7 @@ Set the Actor's rotation on the Z axis to fAlign. + [02 Actor.lua] An alternative version of . @@ -1060,6 +1155,7 @@ Tells the Actor to spin. Can use to define different spinning behavior. + Stops any effect the Actor has. @@ -1069,6 +1165,10 @@ Stretches the Actor to a rectangle of a specific size. + + Determines if the Actor should use texture wrapping or not. + + Set the fractional vertical alignment of the Actor according to fAlign which should be a float in the range 0..1. An alignment of 0 is top aligned while an alignment of 1 is bottom aligned. See for the common case. @@ -1081,6 +1181,9 @@ Sets an Actor's visibility to b. + + Makes the Actor wag. Use to define different wag behavior. + Set the x position of the Actor to xPos. @@ -1134,29 +1237,30 @@ [02 Actor.lua] Stretches an Actor to cover the screen. (equivalent to stretchto,0,0,SCREEN_WIDTH,SCREEN_HEIGHT) - [03 ProductivityHelpers.lua] A customized version of pulse that is more appealing for on-beat effects. + [02 Actor.lua] A customized version of pulse that is more appealing for on-beat effects. - [03 ProductivityHelpers.lua] Sets and Actor as a mask destination. + [02 Actor.lua] Sets and Actor as a mask destination. - [03 ProductivityHelpers.lua] Sets an Actor as a mask source. (Also clears zbuffer; other mask sources need to not clear the zbuffer) + [02 Actor.lua] Sets an Actor as a mask source. (Also clears zbuffer; other mask sources need to not clear the zbuffer) - [03 ProductivityHelpers.lua] Make graphics their true size at any resolution. + [02 Actor.lua] Make graphics their true size at any resolution. - [03 ProductivityHelpers.lua] Scale things back up after they have already been scaled down. + [02 Actor.lua] Scale things back up after they have already been scaled down. - [03 ProductivityHelpers.lua] A customized version of pulse that is more appealing for on-beat effects. + [02 Actor.lua] A customized version of pulse that is more appealing for on-beat effects. - [03 ProductivityHelpers.lua] Sets the x and y location of the Actor in one command. + [02 Actor.lua] Sets the x and y location of the Actor in one command. + Adds a child to the ActorFrame from the specified path. Sets the field of view for the ActorFrame. @@ -1231,12 +1335,44 @@ Sets the vanishing point for the ActorFrame. + + + Creates the ActorFrameTexture. + + + Enables/disables the Alpha Buffer. + + + Enables/disables the Depth Buffer. + + + Enables/disables + + + Enables/disables the Preserve Texture option. + + + Returns the texture. + + + Sets the Texture's name to sName. + + + + Adds a texture to the ActorMultiTexture. Returns the number of texture units. + - Clears all the textures from the MultiTexture. + Clears all the textures from the ActorMultiTexture. - Sets the EffectMode on the MultiTexture. + Sets the EffectMode on the ActorMultiTexture. + + + Sets the size of the ActorMultiTexture from the specified texture. + + + Sets the coordinates of the ActorMultiTexture. Sets a TextureMode on the specified index. @@ -1447,7 +1583,7 @@ Clear all attributes associated with the BitmapText. - [03 ProductivityHelpers.lua] Sets the diffuse and stroke color of text in one command. + [02 Actor.lua] Sets the diffuse and stroke color of text in one command. Returns the text that is currently set. @@ -1462,10 +1598,10 @@ Set the maximum width of the unzoomed text to fWidth. If fWidth is 0, then there is no maximum width. - [03 ProductivityHelpers.lua] Remove any stroke color. + [02 Actor.lua] Remove any stroke color. - [03 ProductivityHelpers.lua] Alias for setting to false. + [02 Actor.lua] Alias for setting to false. If true, set each character of the text in turn to the rainbow colors in the metrics BitmapText::RainbowColor#. @@ -1474,10 +1610,10 @@ Set the text to sText. This clears all attributes. - [03 ProductivityHelpers.lua] Sets text using string.format(sFormat, ...). + [02 Actor.lua] Sets text using string.format(sFormat, ...). - [03 ProductivityHelpers.lua] Alias for . + [02 Actor.lua] Alias for . Sets the stroke color to c. @@ -1775,6 +1911,12 @@ + + Returns true if notes are counted separately in this game. + + + Returns the mapped judgment for tns. + Returns the name of the game such as "dance" or "pump". @@ -2295,6 +2437,7 @@ + Returns the mouse wheel value. Returns the X position of the mouse. @@ -2497,6 +2640,17 @@ Sets the PercentageDisplay from the specified PlayerState and PlayerStageStats. + + + Returns the current TimingData for this player. + + + Sets Actor with Combo position. + + + Sets Actor with Judgment position. + + (PlayerInfo is a part of ScreenGameplay.) @@ -2955,6 +3109,12 @@ Returns the value of X Mode. + + Returns true if the current PlayerOptions makes the current Course/Trail easier. + + + Returns true if the current PlayerOptions makes the current Song/Steps easier. + Sets the X Mode percentage to fXModeVal. @@ -3103,6 +3263,9 @@ Returns the SongPosition for this PlayerState. + + Returns the current Super Meter level for this PlayerState. + Sets the player options to sPlayerOptions for the specified ModsLevel. @@ -3218,6 +3381,9 @@ Returns the number of trails with the specified StepsType and Difficulty that you've scored a certain Grade g on. + + Returns the user table for this Profile. + Returns how much the player weighs. @@ -3750,7 +3916,7 @@ Returns true if the song has edits. - + Returns true if the song has a jacket graphic. @@ -3963,7 +4129,7 @@ Returns the Sprite's texture. - + [02 Sprite.lua] Returns a Frames table consisting of iNumFrames frames lasting for a total of fSeconds seconds. This function is not a member function and should be used as Frames = Sprite.LinearFrames( 5, 2.6 ). @@ -4218,7 +4384,7 @@ Returns true if the specified theme exists. - [03 ProductivityHelpers.lua] Returns the absolute path of a file in the theme. + [02 Utilities.lua] Returns the absolute path of a file in the theme. Returns the current language. @@ -4277,7 +4443,7 @@ Reloads the current theme's metrics. - + @@ -4433,6 +4599,12 @@ Returns the Song related to the UnlockEntry. + + Get all of the steps locked based on StepsType. + + + Get all of the steps locked based on difficulty. + Returns the UnlockRewardType for this entry. @@ -4448,12 +4620,14 @@ Makes the UnlockEntry require passing Hard steps. + + Makes the UnlockEntry require passing Challenge steps. + Makes the UnlockEntry hide in Roulette. - Sets the UnlockEntry's song to sSongName.
- sSongName also requires the group.
+ Sets the UnlockEntry's song to sSongName. sSongName also requires the group.
Example: song,"In The Groove/Pandemonium"
@@ -4518,6 +4692,9 @@ Returns the total number of items in the wheel. + + + Returns the WheelItem at index iIndex. @@ -4542,6 +4719,9 @@ Returns the text of this wheel item. + + Returns the type of this wheel item. +
diff --git a/Themes/_fallback/Scripts/03 IniFile.lua b/Themes/_fallback/Scripts/01 IniFile.lua similarity index 100% rename from Themes/_fallback/Scripts/03 IniFile.lua rename to Themes/_fallback/Scripts/01 IniFile.lua diff --git a/Themes/_fallback/Scripts/03 ThemePrefs.lua b/Themes/_fallback/Scripts/02 ThemePrefs.lua similarity index 100% rename from Themes/_fallback/Scripts/03 ThemePrefs.lua rename to Themes/_fallback/Scripts/02 ThemePrefs.lua diff --git a/Themes/_fallback/Scripts/03 ThemePrefsRows.lua b/Themes/_fallback/Scripts/02 ThemePrefsRows.lua similarity index 100% rename from Themes/_fallback/Scripts/03 ThemePrefsRows.lua rename to Themes/_fallback/Scripts/02 ThemePrefsRows.lua diff --git a/Themes/_fallback/Scripts/03 Gameplay.lua b/Themes/_fallback/Scripts/03 Gameplay.lua index 19ca3de312..be15e61612 100644 --- a/Themes/_fallback/Scripts/03 Gameplay.lua +++ b/Themes/_fallback/Scripts/03 Gameplay.lua @@ -108,62 +108,60 @@ function EvalUsesCheckpointsWithJudgments() return (CurGameName() == "pump") and true or false end --- these need cleanup really. +local ComboThresholds = { + dance = { Hit = 2, Miss = 2, Fail = -1 }, + pump = { Hit = 4, Miss = 4, Fail = 51 }, + beat = { Hit = 1, Miss = 0, Fail = -1 }, + kb7 = { Hit = 1, Miss = 0, Fail = -1 }, + para = { Hit = 2, Miss = 0, Fail = -1 }, + ------------------------------------------- + default = { Hit = 2, Miss = 2, Fail = -1 } +} + function HitCombo() - local Combo = { - dance = 2, - pump = 4, - beat = 2, - kb7 = 2, - para = 2 - } - return Combo[CurGameName()] + if ComboThresholds[CurGameName()] then + return ComboThresholds[CurGameName()].Hit + end + return ComboThresholds["default"].Hit end function MissCombo() - local Combo = { - dance = 2, - pump = 4, - beat = 0, - kb7 = 0, - para = 0 - } - return Combo[CurGameName()] + if ComboThresholds[CurGameName()] then + return ComboThresholds[CurGameName()].Miss + end + return ComboThresholds["default"].Miss end -- FailCombo: -- [en] The combo that causes game failure. function FailCombo() - local Combo = { - dance = -1, -- ITG uses 30 - pump = 51, -- Pump Pro uses 30, real Pump uses 51 - beat = -1, - kb7 = -1, - para = -1 - } - return Combo[CurGameName()] + -- ITG (dance) uses 30. Pump Pro uses 30, real Pump uses 51 + if ComboThresholds[CurGameName()] then + return ComboThresholds[CurGameName()].Fail + end + return ComboThresholds["default"].Fail end +local RoutineSkins = { + dance = { P1 = "midi-routine-p1", P2 = "midi-routine-p1" }, + pump = { P1 = "cmd-routine-p1", P2 = "cmd-routine-p2" }, + kb7 = { P1 = "default", P2 = "retrobar" }, + ------------------------------------------------------------- + default = { P1 = "default", P2 = "default" } +} + function RoutineSkinP1() - local Combo = { - dance = "midi-routine-p1", - pump = "cmd-routine-p1", - beat = "default", - kb7 = "default", - para = "default" - } - return Combo[CurGameName()] + if RoutineSkins[CurGameName()] then + return RoutineSkins[CurGameName()].P1 + end + return RoutineSkins["Default"].P1 end function RoutineSkinP2() - local Combo = { - dance = "midi-routine-p2", - pump = "cmd-routine-p2", - beat = "default", - kb7 = "retrobar", - para = "default" - } - return Combo[CurGameName()] + if RoutineSkins[CurGameName()] then + return RoutineSkins[CurGameName()].P2 + end + return RoutineSkins["Default"].P2 end -- todo: use tables for some of these -aj @@ -175,27 +173,6 @@ function ShowHoldJudgments() return not IsGame("pump") end -local tNotePositions = { - -- StepMania 3.9/4.0 - Normal = { -144, 144, }, - -- ITG - Lower = { -125, 145, } -} - -function GetTapPosition( sType ) - bCategory = (sType == 'Standard') and 1 or 2 - -- true: Normal - -- false: Lower - bPreference = ThemePrefs.Get("NotePosition") and "Normal" or "Lower" - tNotePos = tNotePositions[bPreference] - return tNotePos[bCategory] -end - -function ComboUnderField() - --return ThemePrefs.Get("ComboUnderField") - return false -end - local CodeDetectorCodes = { -- steps PrevSteps1 = { diff --git a/Themes/_fallback/Scripts/03 ThemeAndGamePrefs.lua b/Themes/_fallback/Scripts/03 ThemeAndGamePrefs.lua index cc4ade9f22..fd2eea7913 100644 --- a/Themes/_fallback/Scripts/03 ThemeAndGamePrefs.lua +++ b/Themes/_fallback/Scripts/03 ThemeAndGamePrefs.lua @@ -23,14 +23,14 @@ function InitGamePrefs() end; end function InitUserPrefs() - if GetUserPrefB("UserPrefShowLotsaOptions") == nil then - SetUserPref("UserPrefShowLotsaOptions", true); + if GetUserPrefB("ShowLotsaOptions") == nil then + SetUserPref("ShowLotsaOptions", true); end; local Prefs = { - { "UserPrefGameplayShowStepsDisplay", true }, - { "UserPrefGameplayShowScore", false}, + { "GameplayShowStepsDisplay", true }, + { "GameplayShowScore", false}, --[[ { "ProTimingP1", false}, { "ProTimingP2", false}, --]] @@ -38,13 +38,13 @@ function InitUserPrefs() local BPrefs = { - { "UserPrefAutoSetStyle", false }, - { "UserPrefComboUnderField", true }, - { "UserPrefLongFail", false}, - { "UserPrefNotePosition", true }, + { "AutoSetStyle", false }, + { "ComboUnderField", true }, + { "LongFail", false}, + { "NotePosition", true }, { "UserPrefProtimingP1", false}, { "UserPrefProtimingP2", false}, - { "UserPrefShowLotsaOptions", true}, + { "ShowLotsaOptions", true}, { "ComboOnRolls", false}, { "FlashyCombos", false}, { "GameplayFooter", false}, diff --git a/Themes/_fallback/Scripts/04 KeymapGuard.lua b/Themes/_fallback/Scripts/04 KeymapGuard.lua index d4ecc14003..aaafecfe2d 100644 --- a/Themes/_fallback/Scripts/04 KeymapGuard.lua +++ b/Themes/_fallback/Scripts/04 KeymapGuard.lua @@ -1,24 +1,25 @@ ---People sometimes have problems where they rebind the enter key and thus cannot press start. ---To work around this problem, this script deletes every key binding to Enter. +--[[ People sometimes have problems where they rebind the enter key and thus +cannot press start. To work around this problem, this script deletes every key +binding to Enter. --]] function ClearEnterMappedKeys() - --load Keymaps.ini -local keymaps = IniFile.ReadFile("/Save/Keymaps.ini") + -- load Keymaps.ini + local keymaps = IniFile.ReadFile("/Save/Keymaps.ini") ---iterate through the games -for k,v in pairs(keymaps) do - --iterate through the potential key mappings - for l,w in pairs(v) do - --check for enter - w:gsub("Key_enter","") - --write back - keymaps[k][l] = w + -- iterate through the games + for k,v in pairs(keymaps) do + -- iterate through the potential key mappings + for l,w in pairs(v) do + -- check for enter + w:gsub("Key_enter","") + -- write back + keymaps[k][l] = w + end end + + -- write Keymaps.ini back out. yay. + IniFile.WriteFile("/Save/Keymaps.ini",keymaps) end ---write Keymaps.ini back out. yay. -IniFile.WriteFile("/Save/Keymaps.ini",keymaps) -end - ---actually run it. +-- actually run it. ClearEnterMappedKeys() \ No newline at end of file diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index b3c1f180e9..1760cba4f1 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -24,7 +24,7 @@ ScreenHeight=480 # Allows you to pick all available game modes for your gametype: for example, # inserting enough coins for 1p would let you choose between solo, single # and double before each game -AutoSetStyle=GetUserPrefB("UserPrefAutoSetStyle") +AutoSetStyle=false # Default modifiers and noteskin. DefaultModifiers="1x" @@ -1019,15 +1019,8 @@ GradeTier02IsFullCombo=false NumGradeTiersUsed=7 [Player] -# In The Groove -# ReceptorArrowsYStandard=-125 -# ReceptorArrowsYReverse=145 -# StepMania Alpha 4 -# ~ ReceptorArrowsYStandard=-144 -# ~ ReceptorArrowsYReverse=144 -# SM5 uses a UserPreference for this. -ReceptorArrowsYStandard=GetTapPosition('Standard') -ReceptorArrowsYReverse=GetTapPosition('Reverse') +ReceptorArrowsYStandard=-144 +ReceptorArrowsYReverse=144 ReceptorNoSinkScoreCutoff=4 JudgmentTransformCommand=%JudgmentTransformCommand JudgmentOnCommand= @@ -1044,7 +1037,7 @@ DrawDistanceBeforeTargetsPixels=SCREEN_HEIGHT DrawDistanceAfterTargetsPixels=-128 TapJudgmentsUnderField=false HoldJudgmentsUnderField=false -ComboUnderField=ComboUnderField() +ComboUnderField=false PenalizeTapScoreNone=false JudgeHoldNotesOnSameRowTogether=false HoldCheckpoints=IsGame("pump") diff --git a/Themes/default/Languages/en.ini b/Themes/default/Languages/en.ini index 2afd1e4732..6c3212ddc2 100644 --- a/Themes/default/Languages/en.ini +++ b/Themes/default/Languages/en.ini @@ -91,34 +91,34 @@ ITG DP:=ITG DP: MIGS DP:=MIGS DP: [OptionTitles] -UserPrefAutoSetStyle=Auto Set Style -UserPrefNotePosition=Note Positions -UserPrefComboOnRolls=Rolls Increment Combo -UserPrefComboUnderField=Combo Under Field +AutoSetStyle=Auto Set Style +NotePosition=Note Positions +ComboOnRolls=Rolls Increment Combo +ComboUnderField=Combo Under Field -UserPrefGameplayShowScore=Show Score -UserPrefGameplayShowStepsDisplay=Show Steps -UserPrefShowLotsaOptions=Options Density -UserPrefLongFail=Fail Length -UserPrefFlashyCombo=Flashy Combo -UserPrefGameplayFooter=Gameplay Footer -UserPrefFancyUIBG=Fancy UI Background -UserPrefTimingDisplay=Timing Display +GameplayShowScore=Show Score +GameplayShowStepsDisplay=Show Steps +ShowLotsaOptions=Options Density +LongFail=Fail Length +FlashyCombo=Flashy Combo +GameplayFooter=Gameplay Footer +FancyUIBG=Fancy UI Background +TimingDisplay=Timing Display [OptionExplanations] -UserPrefAutoSetStyle=Allow the game to list all one player and two player modes at once instead of one style only. This might require a restart of StepMania (or press Shift+F2). -UserPrefNotePosition=Determines where the arrow receptors are placed in gameplay. -UserPrefComboOnRolls=Choose if rolls should increment the combo or not. -UserPrefComboUnderField=Determine if the combo should display under the notes or not. +AutoSetStyle=Allow the game to list all one player and two player modes at once instead of one style only. This might require a restart of StepMania (or press Shift+F2). +NotePosition=Determines where the arrow receptors are placed in gameplay. +ComboOnRolls=Choose if rolls should increment the combo or not. +ComboUnderField=Determine if the combo should display under the notes or not. -UserPrefGameplayShowScore=Show or Hide the score display in gameplay. -UserPrefGameplayShowStepsDisplay=Show or Hide the step information display in gameplay. -UserPrefShowLotsaOptions=Choose how many lines/rows of options to choose from. &oq;Few&cq; keeps the list to a minimum. &oq;Many&cq; adds various show-off mods. -UserPrefLongFail=Choose between the original "Long" sm-ssc fail or the "Short" fail adopted later. -UserPrefFlashyCombo=Determine if combo flashes should be shown or not. -UserPrefGameplayFooter=If on, displays a footer that blocks visibility of incoming arrows for a certain region ( DDR's score frame ). -UserPrefFancyUIBG=Toggles the fancy background. "Off" is recommended for older computers. Changes will take effect at the title screen. -UserPrefTimingDisplay=Toggles the display of timing segments on the song progress meter. +GameplayShowScore=Show or Hide the score display in gameplay. +GameplayShowStepsDisplay=Show or Hide the step information display in gameplay. +ShowLotsaOptions=Choose how many lines/rows of options to choose from. &oq;Few&cq; keeps the list to a minimum. &oq;Many&cq; adds various show-off mods. +LongFail=Choose between the original "Long" sm-ssc fail or the "Short" fail adopted later. +FlashyCombo=Determine if combo flashes should be shown or not. +GameplayFooter=If on, displays a footer that blocks visibility of incoming arrows for a certain region ( DDR's score frame ). +FancyUIBG=Toggles the fancy background. "Off" is recommended for older computers. Changes will take effect at the title screen. +TimingDisplay=Toggles the display of timing segments on the song progress meter. ScoringType=Defines which scoring method to use. If Special is selected, you can select a Special Scoring Mode in Theme Options. diff --git a/Themes/default/Languages/es.ini b/Themes/default/Languages/es.ini index 489a5f6f07..7b75a371b6 100644 --- a/Themes/default/Languages/es.ini +++ b/Themes/default/Languages/es.ini @@ -88,34 +88,34 @@ MachineRecord=Récord de esta máquina: %i PersonalRecord=Récord personal: %i [OptionTitles] -UserPrefAutoSetStyle=Auto Set Style -UserPrefNotePosition=Note Positions -UserPrefComboOnRolls=Golpear incrementa el Combo -UserPrefComboUnderField=Combo Under Field +AutoSetStyle=Auto Set Style +NotePosition=Note Positions +ComboOnRolls=Golpear incrementa el Combo +ComboUnderField=Combo Under Field -UserPrefGameplayShowScore=Show Score -UserPrefGameplayShowStepsDisplay=Show Steps -UserPrefShowLotsaOptions=Options Density -UserPrefLongFail=Tiempo de fallo -UserPrefFlashyCombo=Flashy Combo -UserPrefGameplayFooter=Gameplay Footer -UserPrefFancyUIBG=Fancy UI Background -UserPrefTimingDisplay=Timing Display +GameplayShowScore=Show Score +GameplayShowStepsDisplay=Show Steps +ShowLotsaOptions=Options Density +LongFail=Tiempo de fallo +FlashyCombo=Flashy Combo +GameplayFooter=Gameplay Footer +FancyUIBG=Fancy UI Background +TimingDisplay=Timing Display [OptionExplanations] -UserPrefAutoSetStyle=Allow the game to list all one player and two player modes at once instead of one style only. This might require a restart of StepMania (or press Shift+F2). -UserPrefNotePosition=Determines where the arrow receptors are placed in gameplay. -UserPrefComboOnRolls=Choose if rolls should increment the combo or not. -UserPrefComboUnderField=Determine if the combo should display under the notes or not. +AutoSetStyle=Allow the game to list all one player and two player modes at once instead of one style only. This might require a restart of StepMania (or press Shift+F2). +NotePosition=Determines where the arrow receptors are placed in gameplay. +ComboOnRolls=Choose if rolls should increment the combo or not. +ComboUnderField=Determine if the combo should display under the notes or not. -UserPrefGameplayShowScore=Show or Hide the score display in gameplay. -UserPrefGameplayShowStepsDisplay=Show or Hide the step information display in gameplay. -UserPrefShowLotsaOptions=Choose how many lines/rows of options to choose from. &oq;Few&cq; keeps the list to a minimum. &oq;Many&cq; adds various show-off mods. -UserPrefLongFail=Elige entre el fallo "Largo" original de sm-ssc o el "Corto" adoptado más tarde. -UserPrefFlashyCombo=Determine if combo flashes should be shown or not. -UserPrefGameplayFooter=If on, displays a footer that blocks visibility of incoming arrows for a certain region ( DDR's score frame ). -UserPrefFancyUIBG=Toggles the fancy background. "Off" is recommended for older computers. Changes will take effect at the title screen. -UserPrefTimingDisplay=Toggles the display of timing segments on the song progress meter. +GameplayShowScore=Show or Hide the score display in gameplay. +GameplayShowStepsDisplay=Show or Hide the step information display in gameplay. +ShowLotsaOptions=Choose how many lines/rows of options to choose from. &oq;Few&cq; keeps the list to a minimum. &oq;Many&cq; adds various show-off mods. +LongFail=Elige entre el fallo "Largo" original de sm-ssc o el "Corto" adoptado más tarde. +FlashyCombo=Determine if combo flashes should be shown or not. +GameplayFooter=If on, displays a footer that blocks visibility of incoming arrows for a certain region ( DDR's score frame ). +FancyUIBG=Toggles the fancy background. "Off" is recommended for older computers. Changes will take effect at the title screen. +TimingDisplay=Toggles the display of timing segments on the song progress meter. ScoringType=Defines which scoring method to use. If Special is selected, you can select a Special Scoring Mode in Theme Options. diff --git a/Themes/default/Languages/pl.ini b/Themes/default/Languages/pl.ini index e6127933c5..d118f2ce5e 100755 --- a/Themes/default/Languages/pl.ini +++ b/Themes/default/Languages/pl.ini @@ -88,34 +88,34 @@ MachineRecord=Rekord Maszyny #%i! PersonalRecord=Rekord Życiowy #%i! [OptionTitles] -UserPrefAutoSetStyle=Automatycznie Ustaw Styl -UserPrefNotePosition=Pozycja Strzałek -UserPrefComboOnRolls=Narastające combo w Rolls -UserPrefComboUnderField=Combo Pod Strzałkami +AutoSetStyle=Automatycznie Ustaw Styl +NotePosition=Pozycja Strzałek +ComboOnRolls=Narastające combo w Rolls +ComboUnderField=Combo Pod Strzałkami -UserPrefGameplayShowScore=Pokazuj wyniki -UserPrefGameplayShowStepsDisplay=Pokazuj Kroki -UserPrefShowLotsaOptions=Ilość opcji -UserPrefLongFail=Tryb Fail`a -UserPrefFlashyCombo=Błyskające Combo -UserPrefGameplayFooter=Stopka Na Ekranie Gry -UserPrefFancyUIBG=Ozdobne Tło Interfejsu -UserPrefTimingDisplay=Wyświetlanie Timing`u +GameplayShowScore=Pokazuj wyniki +GameplayShowStepsDisplay=Pokazuj Kroki +ShowLotsaOptions=Ilość opcji +LongFail=Tryb Fail`a +FlashyCombo=Błyskające Combo +GameplayFooter=Stopka Na Ekranie Gry +FancyUIBG=Ozdobne Tło Interfejsu +TimingDisplay=Wyświetlanie Timing`u [OptionExplanations] -UserPrefAutoSetStyle=Pozwala grze jednoczesne wyświetlenie trybów dla dwóch graczy a nie tylko dla jednego. Wprowadzenie zmiany możne wymagać restartu Stepmanii (lub naciśnięcia klawisza Shift+F2) -UserPrefNotePosition=Określa pozycje receptorów strzałek podczas gry. -UserPrefComboOnRolls=Włącza naliczanie licznika Combo w sposób narastający dla strzałek typu ROLL. -UserPrefComboUnderField=Określa czy wskaźnik Combo powinien być wyświetlany nad czy pod strzałkami. +AutoSetStyle=Pozwala grze jednoczesne wyświetlenie trybów dla dwóch graczy a nie tylko dla jednego. Wprowadzenie zmiany możne wymagać restartu Stepmanii (lub naciśnięcia klawisza Shift+F2) +NotePosition=Określa pozycje receptorów strzałek podczas gry. +ComboOnRolls=Włącza naliczanie licznika Combo w sposób narastający dla strzałek typu ROLL. +ComboUnderField=Określa czy wskaźnik Combo powinien być wyświetlany nad czy pod strzałkami. -UserPrefGameplayShowScore=Wyświetla lub ukrywa licznik punktów podczas gry. -UserPrefGameplayShowStepsDisplay=Wyświetla lub ukrywa statystykę strzałek podczas gry. -UserPrefShowLotsaOptions=Określa jak dużo modyfikatorów wyświetlić na ekranie opcji piosenki. -UserPrefLongFail=Określa długość czasu animacji ogrywanej po niezaliczanej piosence. Oryginalny z SM5 (Długi) , nowy (Krotki) -UserPrefFlashyCombo=Określa czy licznik Combo może błyskać czy nie. -UserPrefGameplayFooter=Włączona opcja wyświetla, ograniczająca widoczność nadlatujących strzałek, stopkę u dołu ekranu. -UserPrefFancyUIBG=Zarządzanie wyświetlaniem ozdobnego tła interfejsu. Wyłączenie jest zalecane dla straszych komputerów. -UserPrefTimingDisplay=Wyświetlanie segementów z timingiem na pasku postępu piosenki podczas gry. +GameplayShowScore=Wyświetla lub ukrywa licznik punktów podczas gry. +GameplayShowStepsDisplay=Wyświetla lub ukrywa statystykę strzałek podczas gry. +ShowLotsaOptions=Określa jak dużo modyfikatorów wyświetlić na ekranie opcji piosenki. +LongFail=Określa długość czasu animacji ogrywanej po niezaliczanej piosence. Oryginalny z SM5 (Długi) , nowy (Krotki) +FlashyCombo=Określa czy licznik Combo może błyskać czy nie. +GameplayFooter=Włączona opcja wyświetla, ograniczająca widoczność nadlatujących strzałek, stopkę u dołu ekranu. +FancyUIBG=Zarządzanie wyświetlaniem ozdobnego tła interfejsu. Wyłączenie jest zalecane dla straszych komputerów. +TimingDisplay=Wyświetlanie segementów z timingiem na pasku postępu piosenki podczas gry. ScoringType=Opcja pozwala na określenie metody naliczania punktacji. Speed=Regulacja prędkości nadlatujących strzałek. diff --git a/Themes/default/Scripts/03 ThemePrefs.lua b/Themes/default/Scripts/02 ThemePrefs.lua similarity index 100% rename from Themes/default/Scripts/03 ThemePrefs.lua rename to Themes/default/Scripts/02 ThemePrefs.lua diff --git a/Themes/default/Scripts/03 Gameplay.lua b/Themes/default/Scripts/03 Gameplay.lua new file mode 100644 index 0000000000..1235c302b6 --- /dev/null +++ b/Themes/default/Scripts/03 Gameplay.lua @@ -0,0 +1,26 @@ +-- StepMania 5 default theme | script ring 03 | Gameplay.lua +-- someone thought it'd be a good idea to put theme preferences into the fallback +-- when they should've been in default instead. there is no emoticon for how i feel +-- at this moment right now -freem + +-- for example, not every theme wants to worry about custom receptor positions. +local tNotePositions = { + -- StepMania 3.9/4.0 + Normal = { -144, 144, }, + -- ITG + Lower = { -125, 145, } +} + +function GetTapPosition( sType ) + bCategory = (sType == 'Standard') and 1 or 2 + -- true: Normal + -- false: Lower + bPreference = ThemePrefs.Get("NotePosition") and "Normal" or "Lower" + tNotePos = tNotePositions[bPreference] + return tNotePos[bCategory] +end + +-- combo under field is another thing that doesn't always need to be custom +function ComboUnderField() + return ThemePrefs.Get("ComboUnderField") +end \ No newline at end of file diff --git a/Themes/default/metrics.ini b/Themes/default/metrics.ini index c97f6f241e..ac89f8e5e9 100644 --- a/Themes/default/metrics.ini +++ b/Themes/default/metrics.ini @@ -4,6 +4,7 @@ FallbackTheme=_fallback [Common] FirstAttractScreen="" +AutoSetStyle=ThemePrefs.Get("AutoSetStyle") # 02 # [LightsManager] @@ -296,6 +297,16 @@ ShowBoard=GAMESTATE:GetCurrentGame():GetName() == "kb7" [PlayerStageStats] [Player] +# In The Groove +# ReceptorArrowsYStandard=-125 +# ReceptorArrowsYReverse=145 +# StepMania Alpha 4 +# ~ ReceptorArrowsYStandard=-144 +# ~ ReceptorArrowsYReverse=144 +# SM5's default uses a UserPreference for this. +ReceptorArrowsYStandard=GetTapPosition('Standard') +ReceptorArrowsYReverse=GetTapPosition('Reverse') +ComboUnderField=ComboUnderField() [PlayerOptions] @@ -1251,7 +1262,7 @@ ItemsLongRowSharedX=SCREEN_CENTER_X [ScreenOptionsSystemDirection] LineNames="1,2,3,4,5,6,7,8,9,FlashyCombo,RollCombo,10,11,12,13,14,16,LF,17,18,19,20,21,22" -LineLF="lua,UserPrefLongFail()" +LineLF="lua,ThemePrefRow('LongFail')" LineRollCombo="lua,ThemePrefRow('ComboOnRolls')" LineFlashyCombo="lua,ThemePrefRow('FlashyCombo')" diff --git a/src/RageDisplay_OGL.cpp b/src/RageDisplay_OGL.cpp index 0b47a78bf2..20d0a85340 100644 --- a/src/RageDisplay_OGL.cpp +++ b/src/RageDisplay_OGL.cpp @@ -282,6 +282,9 @@ RString GetInfoLog( GLhandleARB h ) GLhandleARB CompileShader( GLenum ShaderType, RString sFile, vector asDefines ) { + if (!glewIsSupported("GL_ARB_fragment_shader")) + return 0; + RString sBuffer; { RageFile file; @@ -1661,7 +1664,7 @@ void RageDisplay_Legacy::SetTextureFiltering( TextureUnit tu, bool b ) void RageDisplay_Legacy::SetEffectMode( EffectMode effect ) { - if (!GLEW_ARB_fragment_program && !GLEW_ARB_shading_language_100) + if (!GLEW_ARB_fragment_program || !GLEW_ARB_shading_language_100 || !GLEW_ARB_shader_objects) return; GLhandleARB hShader = 0; diff --git a/src/ScreenEdit.cpp b/src/ScreenEdit.cpp index 0f91a1feba..7fdd2110ec 100644 --- a/src/ScreenEdit.cpp +++ b/src/ScreenEdit.cpp @@ -3645,7 +3645,7 @@ void ScreenEdit::DisplayTimingMenu() float fBeat = GetBeat(); TimingData &pTime = GetAppropriateTiming(); bool bHasSpeedOnThisRow = pTime.GetSpeedSegmentAtBeat( fBeat )->GetBeat() == fBeat; - bool bIsSelecting = ( (m_NoteFieldEdit.m_iEndMarker != -1) && (m_NoteFieldEdit.m_iBeginMarker != -1) ); + // bool bIsSelecting = ( (m_NoteFieldEdit.m_iEndMarker != -1) && (m_NoteFieldEdit.m_iBeginMarker != -1) ); g_TimingDataInformation.rows[beat_0_offset].SetOneUnthemedChoice( ssprintf("%.6f", pTime.m_fBeat0OffsetInSeconds) ); @@ -3675,7 +3675,7 @@ void ScreenEdit::DisplayTimingMenu() g_TimingDataInformation.rows[scroll].SetOneUnthemedChoice( ssprintf("%.6f", pTime.GetScrollAtBeat( fBeat ) ) ); g_TimingDataInformation.rows[fake].SetOneUnthemedChoice( ssprintf("%.6f", pTime.GetFakeAtBeat( fBeat ) ) ); - g_TimingDataInformation.rows[speed_percent].bEnabled = !bIsSelecting; + // g_TimingDataInformation.rows[speed_percent].bEnabled = !bIsSelecting; g_TimingDataInformation.rows[speed_wait].bEnabled = bHasSpeedOnThisRow; g_TimingDataInformation.rows[speed_mode].bEnabled = bHasSpeedOnThisRow; diff --git a/src/WheelBase.cpp b/src/WheelBase.cpp index 9c3178960c..880121dd49 100644 --- a/src/WheelBase.cpp +++ b/src/WheelBase.cpp @@ -521,7 +521,6 @@ public: return 1; } - static int GetNumWheelItems( T* p, lua_State *L ){ lua_pushnumber( L, p->GetNumItems() ); return 1; } static int IsSettled( T* p, lua_State *L ){ lua_pushboolean( L, p->IsSettled() ); return 1; } static int IsLocked( T* p, lua_State *L ){ lua_pushboolean( L, p->WheelIsLocked() ); return 1; } static int SetOpenSection( T* p, lua_State *L ){ p->SetOpenSection( SArg(1) ); return 0; } @@ -539,7 +538,6 @@ public: LunaWheelBase() { ADD_METHOD( GetWheelItem ); - ADD_METHOD( GetNumWheelItems ); ADD_METHOD( IsSettled ); ADD_METHOD( IsLocked ); ADD_METHOD( SetOpenSection );