Commit Graph

140 Commits

Author SHA1 Message Date
Michael Votaw c0db6beb9c We don't need to set cached nps per player individually, just parse all of it and pass it to Steps 2025-03-03 21:24:17 -08:00
Michael Votaw 2625394ac0 Only store NotesPerMeasure and NpsPerMeasure values per-player if the steps type has different steps per player. 2025-03-03 21:24:17 -08:00
Michael Votaw fd790eb83e Replace #MEASUREINFO with two separate tags, #NPSPERMEASURE and #NOTESPERMEASURE. Stop storing MeasureInfo objects on Steps, and just directly store NpsPerMeasure, NotesPerMeasure, and peakNPS. 2025-03-03 21:24:17 -08:00
teejusb 49263f3c3e Mostly stylistic changes 2025-02-11 19:39:03 -08:00
Michael Votaw ed2b5f8d5e Removing accidentally duplicated lua methods, un-needed SetGrooveStatsHash method (that's getting handled in a different PR) 2025-02-11 19:39:03 -08:00
Michael Votaw 905e44330a Added methods to load/write tech counts to cache. 2025-02-11 19:39:03 -08:00
Michael Votaw 429fab2fbc Added MeasureInfo calculations, and loader/writer for #MEASUREINFO cache 2025-02-11 19:39:03 -08:00
sukibaby e0b254968d std::size_t -> size_t
Removing std prefix from all size_t.
2024-10-01 01:46:26 -07:00
sukibaby abf89ec2b1 Replace SAFE_DELETE / SAFE_DELETE_ARRAY macros
SAFE_DELETE -> RageUtil::SafeDelete
SAFE_DELETE_ARRAY -> RageUtil::SafeDeleteArray

Update JsonUtil.h to include RageUtil.h - MSVC doesn't need it included for some reason, but GCC and XCode does.
2024-09-30 15:13:32 -07: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
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
Martin Natano 55cdb3cf24 Replace std::stof with StringToFloat
std::stof throws an exception on invalid input causing a crash.

fixes https://github.com/itgmania/itgmania/issues/50
2022-07-23 19:56:38 +02:00
teejusb 8f12a5c45c NotesLoaderSSC - Add empty string check before parsing #DISPLAYBPM, preventing crash on malformed step data 2022-06-12 21:21:20 -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
Tracy Ward 04f7a8c466 Rewrite BG/FG changes parsing (#1916)
* Handle commas and equals in BG/FG change tags

Rewrote parsing of BGCHANGES and FGCHANGES tags to be able to
handle people putting commas and equals in the filenames. For the
value positions which can be filenames, check to see if we can
recognize any filename from the song directory followed by a comma,
equal, or end of string. If we can, use that. If not, just treat it
the same as before, looking for the next comma or equal.
2019-10-12 11:41:39 -04:00
teejusb 7e3789b131 Integrate C++11 branch into 5_1-new 2019-06-22 12:35:38 -07:00
Kyzentun Keeslala 2a2007b9c8 Trim chart name, description, and credit after loading them from the simfile. 2016-06-29 19:33:36 -06:00
Jason Felds edabf4605b Clean up three sets of warnings:
* Ensure all switches have a default when working with enums.
* Match defined new[] calls with delete[] calls.
* Respect variable initialization order.
2016-03-24 18:30:29 -04:00
Kyzentun Keeslala 9fe6f49a55 Shut up various Trace calls that were clogging the log file uselessly. 2016-02-10 17:14:17 -07:00
Kyzentun 5852067f47 Added RadarCategory_Notes. Rewrote NoteDataWithScoring stuff to only traverse the NoteData once, and match the radar code in NoteDataUtil. Fixed hand and lift counting in NoteDataUtil::CalculateRadarValues. Removed cap from RadarValues so that Stream, Voltage, Air, Freeze, and Chaos can be over 1.0. Fixed Stream and Voltage to not count hold heads twice. Changed SetRadarValues in NotesLoaderSSC to not require the stepfile version number. 2015-04-06 18:45:23 -06:00
Kyzentun 369368a019 Fixed loading of ssc format edit files. 2015-03-15 16:54:04 -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 98b0af2e27 Compile before committing, kids. 2015-03-09 20:45:28 -06:00
Kyzentun 20953df0bd Rebased loading optimizations to current master. 2015-03-09 20:42:33 -06:00
Kyzentun fa0478affa Merged per-chart music. Updated changelog. 2015-03-09 19:06:57 -06:00
Jason Felds 519ad8672d Revert "Improved NotesLoaderSSC and NotesLoaderSM" 2015-03-09 16:58:56 -04:00
Kyzentun ff520479ca Rewrote NotesLoaderSM and NotesLoaderSSC to use map instead of an else if chain. Substantial improvement to load time. 2015-03-05 20:32:08 -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 c16f045cb4 Fixed UnknownStyleSupport. 2014-10-20 05:14:54 -06:00
Jason Felds 395107d3d5 Revert "Preserve Steps of unknown Style."
This reverts commit 8edd929e24.

This also updates the song cache.
2014-10-19 10:06:40 -04:00
Kyzentun 8edd929e24 Preserve Steps of unknown Style. 2014-10-01 17:12:01 -06:00
Ben "root" Anderson a16a42cb02 Edit loading overhaul: Load edits from song folders; Allow a songfolder-style hierarchy in profile edit folders; Make the #SONG tag optional if we can infer the intended song from the directory hierarchy. 2013-11-14 13:29:00 -06:00
Devin J. Pohly 3cb3098696 Enforce valid timing changes in SSC, hopefully also fix cache 2013-05-28 23:39:11 -04:00
Jason Felds 51027a3904 Revert "Fix problem when loading from cache"
This reverts commit 7c3a9eb427.

Also force increment the cache in case others
got the prior commit.
2013-05-28 21:45:56 -04:00
Devin J. Pohly 7c3a9eb427 Fix problem when loading from cache 2013-05-27 16:14:32 -04:00
Devin J. Pohly f6c1bd8084 Fix timing loading in SSC files
ProcessBPMsAndStops was always making the timing nonempty, which confused
StepMania into thinking every chart had steps timing.  Now we only call this
function on SSC files (1) for song timing, and (2) if the steps have at least
one BPM specified.
2013-05-20 22:17:50 -07:00
Devin J. Pohly c04553846a "Combine" processing for BPMs and stops.
Prep for replacing with new negative-converting algorithm.
2013-05-17 16:43:53 -04:00
Devin J. Pohly 785cff2abc Remove unneeded return value from ProcessBPMs 2013-05-17 05:43:25 -04:00
Devin J. Pohly b1d2f68737 Finish moving ProcessBPMs and ProcessStops together 2013-05-17 05:34:14 -04:00
Devin J. Pohly 8eb76829fb Don't allow edits with no valid #NOTES 2013-05-09 17:45:25 -04:00
Devin J. Pohly adb0d5d4a1 Separate functions for BPM/stop parsing and processing 2013-05-09 00:00:14 -04:00
Jason Felds f5c877cbb6 Replace StringToInt with the std version.
Again, RageUtil isn't the right home.
2013-05-04 11:59:25 -04:00
Jason Felds 28e5148dec The big NULL replacement party part 5.
Right. ' = NULL' would get a lot of these.
2013-05-03 23:39:52 -04:00
Jason Felds ba59dd1656 The big NULL replacement party part 2.
This may take a bit. Trying to do this by operator/command.
2013-05-03 23:11:42 -04:00
Jason Felds 4df86c1590 Just one loop here. 2013-04-28 23:02:10 -04:00
Marcio Barrientos 11a02660be Change #PREVIEWBG to #PREVIEWVID and update the changelog 2012-01-11 14:21:55 -06:00
Marcio Barrientos da84ef04ad Added tags #PREVIEW for .sma and #PREVIEWBG for .ssc
Added HasPreviewBG() and GetPreviewBGPath() lua bindings
2012-01-11 13:53:30 -06:00
AJ Kelly 63055788ca add #JACKET, #CDIMAGE, and #DISCIMAGE tags to .ssc format (up to v0.81 now). 2012-01-04 12:42:53 -06:00