FailType for a given Player can be overriden with respect to preferences, but
Lua has no way to check it. Expose a function to allow doing that, in order to
not accidentally submit invalid scores to GrooveStats.
Unzip zip file at `zipPath` to `targetPath`.
`strip` is optional and defaults to `0`. If set to a number larger than
`0`, that many components are removed from the paths of the extracted
files. e.g. `a/b/c` is replaced with `b/c` when stripping one component
or just `c` when stripping two.
Returns whether all files were extracted successfully.
package.loadlib() can be used to load a dynamic C library allowing
arbitrary code execution in mod charts and themes.
So far I haven't found any theme that depends on the library, so I think
removing it shouldn't break anything.
This adds two more methods:
- `NETWORK:UrlEncode()`: Encode a single string value.
- `NETWORK:EncodeQueryParameters()`: Encode a table as query string.
For now there are two methods:
- `NETWORK:IsUrlAllowed()`: Check whether access to a certain URL is allowed.
- `NETWORK:HttpRequest()`: Perform an HTTP request.
By default access to the network is disabled for all target hosts. It
can be enabled by setting `HttpEnable=1` in the preferences. Individual
hosts have to be added to `HttpAllowHosts` as a comma separated list to
allow access.
See included docs for more details on usage.
This adds Lua hooks to CryptManager for libtomcrypt's SHA256 hash
function. It follows along with the C++ patterns Glenn wrote a decade
and a half ago for CryptMananger's MD5 and SHA1 hooks.
StepMania's CMakeProject-tomcrypt file has been updated to build with
sha256 symbols. Invoking cmake to build with system tomcrypt works fine
as-is.
Note that these functions return binary formatted strings, but themers
can convert to hexadecimal format using the global Lua function
BinaryToHex().
These elements are normally automatically updated when a new Lua.xml is
generated using the --ExportLuaInformation command line argument, but
I've manually updated them here. It works for now.
Running --ExportLuaInformation will generate a new Lua.xml file with
everything available to Lua, including some repetitively-named functions
ported from notitg that were manually condensed down within Lua.xml.
We want to keep these condensed parts, so ExportLuaInformation should
probably be fixed/replaced in the future.
Fix, clarify, and expand prose in LuaDocumentation.xml for classes made
available to Lua.
Add elements for DeviceList, InputList, Quad, and SongMeterDisplay to
Lua.xml.
Expand and clarify the prose for many gloabl Lua functions described in
in LuaDocumentation.xml.
Get Lua.xml's GlobalFunctions listing current with 5_1-new. Remove old
global functions (those moved to 5.1's "legacy" theme) from Lua.xml.
This updates Actor classes, class methods, and Enums listed in the
bundled copy of Lua.xml to be current.
I used the command-line arg --ExportLuaInformation, to generate a wholly
new file, then manually removed some methods (e.g. literally numbered
PlayerOptions methods ported from notitg, CamelCase aliases of
spline-related methods) to keep previous manual modifications intact.
This doesn't touch GlobalFunctions in Lua.xml; those need further
review.
* Implemented Dance Point setting
Methods added:
SetPossibleDancePoints
SetActualDancePoints
* Update luadocs to reflect changes
* Fix possible divide by zero
* Merge DP setting functions into one. (#5)
* Merge DP setting functions into one.
Also, ensure that scores of >100% aren't possible
Function usage: SetDancePointLimits(actual, possible)
Clamps to 100% if actual/possible >100%
* Update the luadocs again
* Use XRandR 1.2 to set fullscreen resolution for single output
Squash of roothorick's PR #497
(also includes Kyzentun's CMake changes from PR #716)
* Cherry-pick json c++1x stuff (b9e3d7174e)
* Cherry-pick c++11 support from 5bba5c0038 and 9f8b045309
* rework Linux (X11) fullscreen, improve display-related Graphics Options
Implement option to select between monitors for exclusive fullscreen mode
on X11 (using XRandR 1.2), or use a fullscreen borderless window.
Reimplement resolution/refresh rate/display mode-related option rows
using Lua, update choices dynamically so only known-good groupings of
resolution/refresh rate/aspect ratio can be selected.
Minimally update Windows/MacOS LowLevelWindow implementations to support
changes made for Linux side. Fullscreen Borderless Window/multi monitor
support from X11 not implemented for those in this commit.
* allow forcibly disabling xinerama use on Linux
When libXinerama is available, SM tries to use it to find the proper
monitor indexes to use to set _NET_WM_FULLSCREEN_MONITORS (on borderless
fullscreen). xfwm4 seems to assume that monitors are numbered in increasing
order from left to right (rather than using the Xinerama-assigned numbers),
so _NET_WM_FULLSCREEN_MONITORS misbehaves on Xfce.
This commit bypasses use of libXinerama, and instead forces SM to induce fullscreen
on the desired monitor in the backup, hacky way: remove all window hints, move window
to desired monitor, then add _NET_WM_STATE_FULLSCREEN hint. This works on
mutter and Xfce.
* Remove multiple warnings on redundant define.
This used to be hard-coded due to pthread related items, but now it's dynamically determined.
* fix _fallback menu behavior for unrecognized aspect ratios
* Fix error recreating existing FS texture
* Bump deployment target to 10.7 to use libc++ on XCode 8
* Add explicit casts to please clang
* Update changelog
* Implemented nITG's Square modifiers
Modifiers added:
Square
SquareOffset
SquarePeriod
SquareZ
SquareZOffset
SquareZPeriod
* Implemented nITG's BumpyX Modifiers
Also fixes up some tiny bits pertaining to the square modifiers.
Modifiers Added:
BumpyX
BumpyXPeriod
BumpyXOffset
* Implemented nITG's TornadoZ Modifiers
Modifiers Added:
TornadoZ
TornadoZPeriod
TornadoZOffset
Another commit is needed to update fallback's metrics
* Update fallback's metrics to accommodate TornadoX
* Implemented nITG's Parabola Modifiers
Modifiers Added:
ParabolaX
ParabolaY
ParabolaZ
* Implemented nITG's Sawtooth Modifiers
Modifiers Added:
Sawtooth
SawtoothPeriod
SawtoothZ
SawtoothZPeriod
* Implemented nITG's Zigzag Modifiers
Modifiers Added:
Zigzag
ZigzagPeriod
ZigzagOffset
ZigzagZ
ZigzagZPeriod
ZigzagZOffset
* Implemented nITG's ModTimer modifiers
Modifiers Added:
ModTimer (Lua method name is ModTimerSetting (takes enums. Ex: 'ModTimerType_Song'). Can be activated with mod strings 'modtimer(song/beat/game/default)' )
ModTimerOffset
ModTimerMult
* Remove Log use from ArrowEffects::GetTime()
* Accidentally removed a CPY(m_BatteryLives)
* Implemented nITG's DrunkZ modifiers
Modifiers added:
drunkz
drunkzspeed
drunkzoffset
drunkzperiod
Another commit is needed to update fallback's metrics
* Update fallback's metrics to accommodate DrunkZ
* Implemented nITG's BeatY & BeatZ Modifers
Modifiers Added:
beaty
beatyoffset
beatyperiod
beatymult
beatz
beatzoffset
beatzperiod
beatzmult
Another commit is needed to update fallback's metrics
* Updated fallback's metrics to accommodate ...
the new Beat modifiers.
* Implemented nITG's Digital Modifiers
Modifers Added:
digital
digitalsteps
digitalperiod
digitaloffset
digitalz
digitalzsteps
digitalzperiod
digitalzoffset
* Removed duplicate zbuffer check.
* Updated Luadocs with the new modifiers
* Removed accidental duplicate Mini from Luadocs
* Split up long modifier lines.
Hopefully, this makes it a bit easier to read.
* Remove accidental commit to root of repo.
* Split up long modifier lines
Hopefully, this makes it easier to read.
* Redid Square functions to not use FastSin
This implementation is based off of 5.2's square_wave function from ModValue.
* Redid zigzag functions to not use FastSin
This implementation is based off of 5.2's triangle_wave function from ModValue.
* Moved square & zigzag calculation to RageMath.
New RageMath functions:
RageSquare
RageTriangle
* Made Square & Digital have the same period...
as Zigzag and Sawtooth.
* Deduplicate tornado calculations.
* Fixed typo in UpdateTornado, and moved UpdateTornado logic to ArrowEffects::Init because it doesn't depend on anything that changes every frame. Tornado metrics are also loaded in ArrowEffects::Init.
* Deduplicated Beat mod update logic.
The logic is now placed into a function called UpdateBeat.
The m_fBeatFactor members are now a 1D array, similar to m_MaxTornado and m_MinTornado.
* Implemented NITG's MoveX/Y/Z modifiers
Added modifiers:
MoveX1-n: Moves a column in the x direction, 100% = move left one arrow size.
MoveY1-n: Moves a column in the y direction
MoveZ1-n: Moves a column in the z direction.