Commit Graph

36138 Commits

Author SHA1 Message Date
teejusb c7d7ab9ae0 Merge branch 'stepmania:5_1-new' into beta 2022-01-21 00:11:53 -08:00
teejusb 2c587c18a0 Merge pull request #11 from natano/win32-mbedtls
Add mbedtls and use it on windows
2022-01-18 13:11:02 -08:00
Martin Natano 6de676984d Add mbedtls and use it on windows 2022-01-18 20:50:15 +01:00
teejusb 7b1db8b2fb Define ssize_t to be the same width of size_t
The size of size_t is defined by the architecture (32bit or 64bit). Since ssize_t is not part of the standard, unlike size_t, it might not be defined but it should always be the same size as size_t.
2022-01-17 22:31:44 -08:00
teejusb c51e0203b9 Merge pull request #5 from natano/netman
Implement NetworkManager
2022-01-16 09:47:46 -08:00
Martin Natano 3fab481611 fixup collect 2022-01-15 22:56:22 +01:00
Martin Natano bb826dc0b2 Allow cancellation of HTTP requests
`NETWORK::HttpRequest()` now returns a HttpRequestFuture with a
`Cancel()` method.
2022-01-15 22:56:22 +01:00
Martin Natano 134fa9a3d9 IXWebSocket: Allow to cancel asynchronous HTTP requests
Usage:

    auto args = this->httpClient.createRequest(url, method);
    httpClient.performRequest(args, ...);
    [...]
    // Oops, we don't actually want to complete the request!
    args->cancel = true;

Submitted upstream:
https://github.com/machinezone/IXWebSocket/pull/332
2022-01-15 22:56:22 +01:00
Martin Natano bc4a275510 Add parameter encoding helpers to NETWORK
This adds two more methods:
- `NETWORK:UrlEncode()`: Encode a single string value.
- `NETWORK:EncodeQueryParameters()`: Encode a table as query string.
2022-01-15 22:56:08 +01:00
Martin Natano dc49af3c59 Implement NetworkManager
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.
2022-01-15 22:56:08 +01:00
teejusb ddfc49e0b5 Merge pull request #10 from teejusb/tns
Add support for disabling timing windows on a per-player basis
2022-01-05 18:21:57 -08:00
teejusb a48a5b73ad Remove returned timing window table 2022-01-05 18:21:28 -08:00
teejusb 99ee1f2b84 Use bitset instead of map and adjust files accordingly. 2021-12-21 23:44:37 -08:00
Crystal Squirrel 21bb1dbdd3 Merge pull request #2083 from natano/unbind-hyphen
Change the default binding for P2/back from hyphen to backslash
2021-12-16 11:31:20 +00:00
teejusb 2967165235 Logic fixes 2021-12-10 21:12:11 -08:00
teejusb c10d8e4eb5 Initial Implementation of disabling timing windows per player. 2021-12-10 00:27:21 -08:00
teejusb 47a6f625f1 Actually add the Visual Delay method 2021-12-06 13:10:02 -08:00
teejusb 13ae6e56db Merge pull request #9 from teejusb/visualdelay
Add player specific Visual Delay.
2021-11-02 02:09:24 -07:00
teejusb 8673c28161 Convert ms to seconds. Use the PlayerState's m_Position in ArrowEffects so it actually works. 2021-10-26 21:22:17 -07:00
teejusb 02105d57dd Revert "Always use PlayerState's own timing because of visual delay."
This reverts commit 8edca26493.
2021-10-22 18:58:22 -07:00
teejusb 8edca26493 Always use PlayerState's own timing because of visual delay. 2021-10-22 18:54:54 -07:00
teejusb 6dc0ec5258 Woops, actually store the value of the visual delay. 2021-10-22 18:33:13 -07:00
teejusb 547b379765 Type and parsing fixes. 2021-10-22 18:18:15 -07:00
teejusb ef3b2142af Fix some brackets 2021-10-22 17:28:48 -07:00
teejusb b371a4d9c4 Fix typo in StringToFloat 2021-10-22 17:22:21 -07:00
teejusb e0abda3d24 Make use of the m_fVisualDelay value 2021-10-22 17:17:48 -07:00
teejusb 711726a8d6 Add player based visual delay to PlayerOptions 2021-10-22 17:01:41 -07:00
teejusb 7e82e36223 Merge pull request #7 from natano/json
Add json encoding/decoding functions to lua
2021-10-13 10:59:15 -07:00
Martin Natano b4f86a2052 Add json encoding/decoding functions to lua
This adds two global functions:

- `JsonEncode()`: Encode data as JSON. Optionally "minify" the result.
- `JsonDecode()`: Decode JSON data.
2021-10-13 19:33:02 +02:00
teejusb 0b17369078 Merge pull request #6 from natano/fix-BinaryToHex
Fix BinaryToHex()
2021-10-07 11:53:12 -07:00
Crystal Squirrel cd7da39a97 Merge pull request #2041 from skogaby/5_1-new
Add a serial lights driver, to output lights information over serial for Win32
2021-10-01 01:00:06 +01:00
Crystal Squirrel e977c06d6a Merge pull request #2149 from natano/stats-xml-size
Increase Stats.xml file size limit to 100MB
2021-10-01 00:34:32 +01:00
Crystal Squirrel b8fc345fd3 Merge pull request #2150 from natano/SM-fix-BinaryToHex
Fix BinaryToHex()
2021-10-01 00:32:12 +01:00
Crystal Squirrel 9ffaae7e15 Merge pull request #2153 from teejusb/verifythemename
Verify that PrefsTable[name] exists before attempting to index the preference in ThemPrefs
2021-10-01 00:23:12 +01:00
teejusb a105e3bd60 Verify that PrefsTable[name] exists before indexing the pref. 2021-09-24 14:57:49 -07:00
teejusb 569b1dba33 Verify that PrefsTable[name] exists before indexing the pref. 2021-09-24 14:49:02 -07:00
Martin Natano baa5de4cd2 Fix BinaryToHex()
Previously the function stopped short on nul bytes ("\0") due to usage
of the SArg() macro, which does not retrieve the length of the lua
string.

before the fix: `BinaryToHex("a\0b")` -> `"61"`
after the fix: `BinaryToHex("a\0b")` -> `"610062"`
2021-09-19 22:27:09 +02:00
Martin Natano 8c2f13da2c Fix BinaryToHex()
Previously the function stopped short on nul bytes ("\0") due to usage
of the SArg() macro, which does not retrieve the length of the lua
string.

before the fix: `BinaryToHex("a\0b")` -> `"61"`
after the fix: `BinaryToHex("a\0b")` -> `"610062"`
2021-09-19 22:07:31 +02:00
teejusb f8c2209f86 Merge branch 'stepmania:5_1-new' into beta 2021-09-01 17:36:10 -07:00
teejusb 66420029c8 Merge pull request #4 from natano/update-readme
Add changes to README.md
2021-09-01 14:58:55 -07:00
Martin Natano 1c45882843 Add changes to README.md 2021-09-01 23:51:58 +02:00
Martin Natano 9b3f26d672 Increase Stats.xml file size limit to 100MB
A lot of people have run into the previous ~10MB limit and increasing it
to 100MB doesn't seem to break anything.

I left a limit in place, so that excessively large Stats.xml files on a
USB profile can't be used to make a cab run out of memory. (SM uses a
multiple of the memory that is required for the file on disk.)
2021-09-01 23:20:28 +02:00
Tyler Brekke 84dd29527a Merge pull request #2147 from teejusb/libudev
Add libudev-dev to ci.yml
2021-08-31 13:33:36 -07:00
teejusb 7fea5a253d Merge pull request #3 from natano/track-held-misses
Track held misses
2021-08-31 09:26:45 -07:00
Martin Natano f18695df59 Track held misses
This adds a `HeldMiss` attribute to judgment messages and a GetHeld()
method to TapNoteResult.
2021-08-31 18:25:09 +02:00
teejusb d101be19e7 Add libudev-dev to ci.yml. This should hopefully fix the failing continuous integration tests on Ubunut. 2021-08-29 11:36:30 -07:00
teejusb 58611d0ecb Move global.h to the top. It otherwise fails compilation when using gcc
One day I'll fix up the headers and run IWYU on the repo
2021-08-29 10:44:31 -07:00
teejusb 08e271d602 Add a preference to control the ordering of how notes are rendered
Added RenderEarlierNotesOnTop (false by default to preserve ITG behavior).
2021-08-25 14:38:10 -07:00
teejusb 7f90093cd9 Allow both rate mod versions (preserve + don't preserve pitch)
This is toggleable with a new preference call "RateModPreservesPitch" (true by default to preserve existing SM5 behavior)
2021-08-25 00:04:28 -07:00
teejusb 3111f90b75 Fix hold note rendering
Reverses the logic changes done in commits: https://github.com/stepmania/stepmania/commit/567f8363e8dab41a75c9e5a8d307dcf991fb816d and https://github.com/stepmania/stepmania/commit/e96b17015421a0b2777746462838ae6897ea910d
2021-08-23 18:11:07 -07:00