Commit Graph
5012 Commits
Author SHA1 Message Date
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 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
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
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
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 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
teejusb c4990dd7ac Apply the Mine Fix patch
Link here: https://gist.github.com/DinsFire64/4a3f763cd3033afd55a176980b32a3b5#file-minefix_rc1-patch
2021-08-23 17:52:10 -07:00
Martin Natano 65e859d6c5 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-08-23 22:19:34 +02:00
Martin Natano 6894386662 Change the default binding for P2/back from hyphen to backslash
This is a workaround to make the hyphen key usable in text entry
screens. It allows to add a hyphen to profile names and set a negative
offset in edit mode.

Technically backslash is also a typeable character, but it seems to be
less common names in user names and not necessary for typing negative
offsets.

Fwiw, in outfox P2/back is unbound.
2021-08-19 22:28:59 +02:00
Crystal Squirrel 5d4a6cf903 Fix std::stoi bad behaviour closes #2130
Patched with outfox upstream, this restores BG as it is expected
2021-08-14 21:29:48 +01:00
quietly-turningandCrystal Squirrel 6bd6963406 Revert "Merge pull request #1888 from mwkroening/notes_loader-invalid_argument"
This reverts commit 56caf6da4b.
2021-08-14 21:25:27 +01:00
din d67cbcf5c1 Fix lighting typo. 2021-06-01 12:09:46 -05:00
Tracy Ward 984dc8668f fix minor merge error in comment 2021-03-23 03:33:26 -04:00
Crystal SquirrelandGitHub f1f76bc71b Merge pull request #2103 from DinsFire64/5_1-new
stac support & Linux LED refactor (2078)
2021-03-23 04:42:05 +00:00
din 67b2d06406 Linux_LED refactor 2021-03-22 23:40:05 -05:00
Crystal SquirrelandGitHub 521b09ea1f Merge pull request #2071 from Davidian1024/not_a_joystick_exceptions
Added an exception to the "not a joystick" logic for the RedOctane USB Pad.
2021-03-23 04:25:47 +00:00
din fa4109b652 stac support 2021-03-21 13:42:03 -05:00
Gareth FrancisandGitHub aeb5c7598f Handle exceptions in int conversions (#2092)
* RageUtil: Add exception-safe wrappers around std::stoi, stol, stoll

* Replace use of std::stoi with exception-safe StringToInt
2021-02-15 12:36:51 -08:00
Crystal SquirrelandGitHub 3f756be055 Merge pull request #2084 from natano/input-mapping-disambiguate
Mark keypad buttons as such in the input mapping screen
2021-01-28 08:51:40 +00:00
Crystal SquirrelandGitHub ba4a25d04e Merge pull request #2062 from FMS-Cat/RateModsAffectFGChanges
feature: Add a preference, RateModsAffectFGChanges
2021-01-28 08:50:12 +00:00
Martin Natano 5c27754b39 Mark keypad buttons as such in the input mapping screen
Both the slash key and the numpad slash key were displayed as 'Key /',
so it's not obvious to the user which key actually has been bound. Let's
display them as 'Key /' and 'KP /' instead. Same for other KP keys.
2021-01-18 21:54:30 +01:00
Colby Klein aab36dae8d macos apparently wants the arm64 define instead sometimes 2021-01-08 08:37:44 -08:00
Colby Klein 261daef933 fix build and no audio out on macOS 11, closes issue #2080 2021-01-08 07:58:35 -08:00
dinandGitHub a7f666ecdb PIUIO Btn board lights, menu lights added. (#2073) 2020-12-17 11:45:58 -08:00
David Brinovec da92003005 Added an exception to the "not a joystick" logic for the RedOctane USB Pad. 2020-11-27 17:24:25 -05:00
ArusekkandGitHub 95d782d3fc input: Low-effort X11 mouse support (#2042)
A simple wrapper around XLookupKeysym, which does not return
expected XK_Pointer_* for button events.
Tested on Gentoo Linux.
2020-11-23 12:21:17 -08:00
FMS-Cat b457c098d8 comment: fix incorrect comments 2020-10-20 13:24:44 +09:00
FMS-Cat 7d2a70db23 feat (RateModsAffectFGChanges): Actually implemented
I'm trying to transfer the nITG implementation for now
2020-10-20 02:16:02 +09:00
FMS-Cat a6dd6f4ad7 feat (RateModsAffectFGChanges): add a PREFSMAN RateModsAffectFGChanges 2020-10-20 01:38:55 +09:00
Tracy WardandGitHub 6a645b4710 Fix CMake error when configuring with WITH_LIBXTST=NO (#2060) 2020-10-06 13:25:19 -07:00
quietly-turningandGitHub 3968c94782 Merge pull request #2043 from Arusekk/wreturn-type
Fix -Wreturn-type and its undefined behavior
2020-09-15 19:48:15 -04:00
dinandquietly-turning 771d0a1c7d check pacdrive functions before calling them
Before, if the PacDrive32.dll provided by Ultimarc wasn't found,
stepmania would attempt to write to the Pac-Drive anyway, resulting in a
call on a null pointer.

This adds a quick check against PacDriveConnected during the update, and
checks if the pacdrive functions exist before calling them.
2020-09-14 23:20:56 -04:00
Kevin Turnerandquietly-turning 2f97420f81 Updated light-setting code to use switch statements
I will say, the version of this that didn't have break statements had
way, way more flashy light patterns than the boring, correctly
functioning version of this.

Also, the preference now defaults to "minimaid"
2020-09-11 16:48:07 -04:00
Kevin Turnerandquietly-turning ad2825ba3c Cleaned up if-else code and made pref check case-insenstive 2020-09-11 16:46:07 -04:00
Kevin Turnerandquietly-turning 47d6d82962 Add preference to change PacDrive light ordering
The currently proposed light ordering presents a problem for those who have bought a LumenAR or have followed the OpenITG standard for wiring lights. With this change, the default ordering stays the same, but users have the option to define "openitg" or "lumenar" as their preferred light ordering in Preferences.ini under the newly defined "PacDriveLightOrdering" preference.
2020-09-11 16:45:42 -04:00
quietly-turning 72cd6edf5c give Lua access to tomcrypt's SHA256
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().
2020-09-09 15:37:01 -04:00
quietly turning fdef606b46 expose RageUtil's BinaryToHex to Lua
The hashing functions that CryptManger currently exposes to Lua
return hash strings formatted in binary.  Themes using those hash
functions may want to compare hex strings.

RageUtil already had a BinaryToHex utility; this commit exposes it
as a global function, following along with other utility functions
in RageUtil.
2020-09-09 15:16:24 -04:00
Arusekk 74331b6b3c Fix -Wreturn-type and its undefined behavior
Silence the following warning message:
src/NotesWriterSM.cpp:260:11: warning: control reaches end of non-void function [-Wreturn-type]

This warning had meaningful implications for some reason.
When I compiled the current version with stack protector enabled,
GCC optimized out successful return from the function, and encouraged
undefined behavior far less intuitive than an unspecified value.

Whenever saving a steps file on a -DCMAKE_BUILD_TYPE=Release build,
the game printed a message about stack protection violation,
and aborted itself, even though no violation took place.

GCC version:
gcc (Gentoo 10.2.0 p1) 10.2.0
2020-07-28 21:43:07 +02:00