Commit Graph

379 Commits

Author SHA1 Message Date
Brandon W 7b2f0338b8 Add centering back into edit/practice mode playback. 2024-09-30 17:20:11 -07:00
Brandon W cff063cd21 Fix routine chart loading/playback in EditMode. 2024-09-30 13:59:47 -07:00
Brandon W 5bb277b5de Optionally load in P2 during PracticeMode playback.
Use the first PlayerNumber that comes in under export options, this fixes P2
loading by itself in PracticeMode.
2024-09-22 10:59:06 -07:00
sukibaby eb35a9b9af Switch from Float to Integer Time Values
- Use fast data types where possible so the compiler can optimize for speed based on platform
    - for example, 128 bits might be fastest on ARM
    - good future-proofing

- Refactor GetTimeSinceStart() to be a bit faster
    - multiplication is much faster than division

- Implement a RageTimer method to get the seconds value as a plain int, for the places which cast the seconds value to an int

- Changing from GetTimeSinceStartFast() to GetTimeSinceStart() where accuracy is important

- Changing from GetTimeSinceStart() to GetUsecsSinceStart() for timestamp diffs

- Adjust RageThreads to accomodate an unsigned timestamp value
   - a constant for the maximum value of `uint_fast64_t` replaces `-1` to accommodate the change from signed to unsigned for the `locked_at` variable
   - i have separate constants for `std::numeric_limits<std::uint_fast64_t>::max()` and `static_cast<std::uint_fast64_t>(-1)`, so the reader understands -1 represents an error code, though they evaluate to the same value, so i could remove one of the two

- Add two methods to calculate the MMSSMsMs / MMSSMsMsMs time value from usecs directly instead of inferring it from a seconds value, in RageUtil

- Use a similar counter/modulo based method for WheelNotifyIcon, similar to what i did for text_glow in NoteField in 2eeee03

- Make `g_iStartTime` static const for safety

Rename two timer functions:
GetUsecsSinceStart -> GetTimeSinceStartMicroseconds
GetMicrosecondsSinceStart -> GetSystemTimeAsMicroseconds

Remove std prefix from uint_fast64_t
2024-09-22 01:27:45 -07:00
sukibaby 53cd968b90 Removing bApproximate (part 2)
This should wrap up removing this flag from the code base.
2024-09-20 22:03:15 -07:00
sukibaby 21088502b9 Remove clamp macro
Doesn't really need to exist since  all it's doing is inlining std::clamp.
2024-09-03 20:50:48 -07:00
hayoreo db7b7b425c Add LR and UD Mirror.
Adds a left-right and up-down mirror for 4-panel and solo modes.
2024-03-06 16:10:21 -08:00
Martin Natano bacecae1f7 Decouple <vector> 2023-04-21 22:13:41 +02:00
Martin Natano 78fb2e9fc3 Decouple <cstddef> 2023-04-20 11:21:29 +02:00
Martin Natano 093675cdc3 Use attributes where possible 2023-04-20 11:21:29 +02:00
Martin Natano b68ca517e6 Clean up math functions
- Remove checking for standard functions from the build system
- Prefix all invocations with std::
- Replace suffixed functions with unprefixed versions
- Include <cmath> in all files that use it and remove the global include

e.g. floorf(x) -> std::floor(x)
2023-04-19 19:31:40 +02:00
Brian Phlipot d079940fea Address PR feedback. 2023-02-02 11:54:17 -08:00
Brian Phlipot 4a6b1a743c Enable more compiler warnings and treat them as errors. 2023-02-02 11:54:17 -08:00
Brian Phlipot 95e55f5cdd Last RString MSVC compiler error. Eliminate gotos to fix more MSVC compiler errors. 2022-10-03 16:21:19 -07:00
Brian Phlipot 0cc289fa1c More explicit RString creation to fix Windows build. 2022-10-03 16:21:19 -07:00
Michael Sundqvist 0cba3579de Remove global "using namespace std;" declarations, use "std::" prefixes on all std elements
Fix whitespace changes
2022-07-31 22:14:38 +02:00
tertu marybig 9b348090a7 HyperShuffle implementation
Also add it to _fallback
2022-06-23 11:09:40 -07:00
teejusb 15c13ed7df Set default editor noteskin to cel 2022-06-05 18:23:08 -07:00
Gareth Francis 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
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
teejusb 7e3789b131 Integrate C++11 branch into 5_1-new 2019-06-22 12:35:38 -07:00
sillybear e92f19c63d [ScreenEdit] Fixed Player NoteField bug when SCREEN_HEIGHT != 480 (#1357) 2017-05-13 11:49:55 -07:00
Kyzentun Keeslala 5f4cd214d9 Disable autosave when not in EditMode_Full to make sure it doesn't do anything in practice mode. 2016-03-04 11:24:23 -07:00
Kyzentun Keeslala ae5ff0724a Added Clear timing in region option to timing menu in edit mode. Disabled pasting clipboard timing if it's not safe to fix crash. 2016-01-18 11:48:50 -07:00
Kyzentun Keeslala db06b4c1a3 Call ArrowEffects::Update on ScreenEdit during play mode so that Tornado and other stuff will work. 2015-12-11 00:02:31 -07:00
Flameshadowxeroshin aba0f1f7b3 Rename GameButtonType_INVALID to GameButtonType_Menu.
Strictly that's not right but close enough.
2015-12-05 20:02:00 -06:00
Flameshadowxeroshin d329c80ad3 remove guitar cruft
There was a bunch of code for handling guitar-specific input such as hammer-ons/pull-offs and strumming. Given that guitar was removed, and as far as I understand, will not be added back into SM5, it makes sense to remove code that had no other use.
2015-12-05 11:12:17 -06:00
Kyzentun Keeslala 66edc2d233 Changed Edit Mode to not add the global offset to the Current Second field. Updated changelog. 2015-10-10 01:06:32 -06:00
Kyzentun Keeslala 2d64694f14 Changed Song and ScreenEdit to not save a .sm file when split timing is used. 2015-10-02 16:26:59 -06:00
Kyzentun Keeslala 155b185307 Fixed crash in edit mode caused by chart mods not revalidating the ATIs of the notedata. Edit mode still doesn't play attacks perfectly right. 2015-07-11 00:43:37 -06:00
Kyzentun 9790d613b5 Changed ScreenEdit::HandleAlterMenuChoice to not prompt for clearing when it is used by cut, which is used by all the transform choices. 2015-04-20 07:47:26 -06:00
Kyzentun b04e7faec6 Fixed RevertFromDisk by making it turn off the InStepEditor flag while reloading the song. Removed redundant call of loaderSSC.TidyUpData from NotesLoader::LoadFromDir because loaderSSC.LoadFromDir calls it. 2015-04-13 10:33:09 -06:00
Kyzentun 3cb7b5d2a5 Typo fix in ScreenEdit help from SpookyMagician. 2015-04-06 23:00:51 -06:00
Kyzentun d7e032b478 Added 1, 2, and 4 measure choices to shift menus in edit mode. 2015-04-04 22:38:18 -06:00
Kyzentun 9e5081476f Added timing menu options to Edit Mode that allow shifting and copying timing segments of a chosen type in the selected region or everywhere below the cursor. 2015-04-04 09:10:00 -06:00
Kyzentun a2798e16f4 More aggressive caching. In general, this makes Stepmania avoid looking in the song directory at all if the song is in the cache, in order to load songs faster. All the RadarValue calculations were also rolled into one to reduce the time needed to build the cache. 2015-03-23 11:35:30 -06:00
Kyzentun 3140c4f30f Changed preview length setting to occur when the special preview file is set in edit mode. 2015-03-11 18:55:06 -06:00
Kyzentun ddb1683bb7 Autosave completed but not tested. 2015-03-09 19:47:44 -06:00
Kyzentun 064aead73c Added autosave to edit mode. 2015-03-09 19:47:43 -06:00
Kyzentun fa0478affa Merged per-chart music. Updated changelog. 2015-03-09 19:06:57 -06:00
Kyzentun d3367d6a16 Add prompt for clearing an area in Edit Mode. Updated changelog. 2015-03-08 00:56:29 -07:00
Kyzentun 976f773f7c Merge pull request #486 from kyzentun/mute_actions
Toggle key for muting actions
2015-03-07 17:51:28 -07:00
Kyzentun 0318f07d2d Implement preview music properly as a new optional tag in the ssc file. Changed ScreenManager to emit an error instead of asserting if a screen attempts to use SetNewScreen inside an InitCommand. Changed decorations layer to be a proper child instead of stripping away the ActorFrame. 2015-03-04 01:31:02 -07:00
Kyzentun 846f79879c Added MUSIC tag to note data to allow each chart in a simfile to use a different music file. 2015-03-02 18:44:01 -07:00
Kyzentun b293a8c073 Added debug key for toggling action sounds off. Touches every place that RageSound::Play is called, hope I didn't miss one. 2015-02-28 06:25:02 -07:00
Kyzentun f1229d29cb Made backslash mappable. Fixed mistake in previous AddSegment fix so now it correctly compares to the previous segment again. F7/F8 no longer allow negative bpms to match Edit BPM behavior. 2015-02-16 13:31:21 -07:00
Kyzentun cb379505d5 Changed edit mode to allow configuring RECORD_HOLD_SECONDS. 2015-02-08 18:39:45 -07:00
Kyzentun c7ffbb3453 Lead in time before recording starts in edit mode is now a preference. 2015-01-31 14:03:30 -07:00
Kyzentun f4a718a824 SetCompatibleStylesForPlayers and ForceSharedSidesMatch added to GameState for SSM to use to fix style mismatch problems.
StyleInputToGameInput changed to take a vector to return values in to handle multiple inputs mapped to a single column.  Associated adjustments to everything that uses it.
Player no longer drops holds in columns that have multiple inputs mapped to them if the wrong one is held.
Running out of stage tokens changed from assert to error.
2015-01-17 21:15:15 -07:00
Kyzentun 3fb36af157 Separate styles for players. Notefields positioned between margins. Edit mode works for kickbox. 2014-12-09 22:27:00 -07:00