Commit Graph

109 Commits

Author SHA1 Message Date
Crash Cringle becd375544 Only UpdateMeterSort when necessary (when sorting), account for other games and styles.
Songs are already sorted by title so no need to do so again (otherwise big boi lag)
2024-03-02 23:48:04 -08:00
Crash Cringle d788071d4d Add sorting by Block level
(cherry picked from commit e1c8326a6a71f4a15c3f123391dc3f3331ee4a7b)
2024-02-25 09:36:21 -08:00
Crash Cringle 3fd0bd8ade Creating mapping of preferred sort section name to songs. 2024-02-25 09:36:21 -08:00
Crash Cringle 6cd43782d5 Add lua docs for GetPreferredSortSongsBySectionName, update comment, remove duplicate code 2024-02-25 09:36:21 -08:00
Crash Cringle 58be4d521e Allow songs to exist in multiple Sections in Preferred Sort.
This commit fixes a bug that causes the music wheel to freak out when a song is placed in multiple sections.
This can occur when a user's preferred songs have a song located in two different sections.

This is only applied to Preferred Sorting because Preferred sorting is the only sort where it is possible for a song to be a part of multiple sections (e.g. A song only has 1 Title therefore it would only appear in 1 section of the SORT_TITLE).

Preferred sorting allows users to create custom groups/sections by creating a file that defines the songs and their respective sections as they should appear in the sorting. Players are now able to include a song in multiple sections. Themers are now able to display the Preferred Sort of two players on 1 screen (This previously would have caused duplicate section names to occur)
2024-02-25 09:36: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 2d9cc038cd Downgrade to C++17 2023-03-17 20:07:15 +01:00
teejusb fbed947b9c Allow PreferredSongs/PreferredCourses to be set from absolute paths 2023-03-17 01:12:00 -07: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
Martin Natano 43050643d6 Revert back to ignoring FastLoad when reloading from operator menu
Many people (especially chart authors) expect that behaviour.
2022-10-28 17:40:02 +02:00
Brian Phlipot a0e805e511 Add std:: prefixes to all shuffle calls. Use unique_ptr instead of shared_ptr. 2022-10-03 16:21:19 -07:00
Brian Phlipot 37aff00d6e Require C++20 for building Stepmania. 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
Martin Natano f60707b506 Add support for incremental updates to ScreenReloadSongs 2022-06-10 19:33:23 +02:00
Martin Natano 49127f6a92 Remove RageUtil_CachedObject
I don't notice any performance drawback in gameplay, but it was
massively slowing down ScreenReloadSongs.
2022-06-10 19:33:23 +02:00
Martin Natano 62f8ed5c5c Always allow fast load when reloading 2022-06-10 19:33:23 +02:00
Martin Natano 024f3ac96a Don't crash when reloading songs with players joined
This allows to call ScreenReloadSongs from SSM.
2022-03-19 08:18:58 -07:00
Martin Natano 0861ed45c7 Merge /AdditionalSongs into /Songs, and /AdditionalCourses into /Courses
Includes a backwards-compatibility mechanism to adapt paths when loading
Stats.xml.
2022-03-11 22:35:31 +01:00
Tracy Ward f104e813c4 Delay writing image cache index until after load complete
While loading all songs, disable writing the index file for the image
cache, in order to speed up loading and cache generation, similar to
how the song cache index file write is delayed.
2019-10-12 11:24:13 -04:00
teejusb 7e3789b131 Integrate C++11 branch into 5_1-new 2019-06-22 12:35:38 -07:00
Alexander Griffin c0981c42ec Changing BannerCache into ImageCache to support more imagetypes (#1532) 2017-09-19 14:49:42 -07:00
Kyzentun 2aee27a276 Backport custom song support. Prefs are CustomSongsEnable, CustomSongsMaxCount, CustomSongsLoadTimeout, CustomSongsMaxSeconds, CustomSongsMaxMegabytes. Metrics are NumProfileSongGroupColors and the colors with it. Profile custom load function is passed PlayerNumber now. Stepmania must run as root to save USB profile scores. (#1470) 2017-06-06 05:30:06 -07:00
Kyzentun Keeslala d372a6c8fd Added timer to not update loading window after every song to speed up loading. 2016-04-18 13:08:20 -06:00
Kyzentun e591c559c6 Fixed hold cap rendering when Tiny modifier is used. Still has the 1px seam though. Added sanity checking groups progress to SongManager loading. 2015-05-06 15:48:23 -06:00
Kyzentun 2b4cabfb57 Added keybinding for reloading songs on SSM, and lua function for doing it from lua. Added NeverCacheList preference for WIP groups that should never be cached. Rewrote TimingData::CopyRange in preparation for using it to copy/paste timing data from the selected area in edit mode. 2015-03-31 15:20:37 -06:00
Kyzentun 8b09da8e64 Various changes to speed up start up time:
Added delay_save_cache to SongCacheIndex so that it doesn't write the entire cache index file after every song is loaded when loading songs.
Added m_SongsByDir to SongManager so that GetSongFromDir doesn't have to walk the entire list of songs.
Minor changes to when LoadEnabledSongsFromPref occurs and how SanityCheckGroupDir works to speed up loading.
Song::ReloadFromSongDir removes cache file to force an actual reload from the song dir instead of reloading from the cache.  ReloadFromSongDir exposed to lua.
Reordered Actor::LoadFromNode to put Command first because that case is more common.
Course::GetTrailUnsorted reserves entries before starting to save time reallocating.
join in RageUtil calculates the final size of the concatenated strings reserves it to save time reallocating.
Added time log file to RageLog for profiling.
2015-03-30 17:45:52 -06:00
Colin Wallace 473974e52f Add ability to delete songs from disk at the song selection screen (Ctrl+Backspace) 2015-03-27 05:22:55 +00:00
Kyzentun 3fb36af157 Separate styles for players. Notefields positioned between margins. Edit mode works for kickbox. 2014-12-09 22:27:00 -07:00
Kyzentun 4f95bf08ad Function chaining for actors and singletons. 2014-12-01 22:31:30 -07:00
Kyzentun a74a49af78 Changed many uses of Dialog::OK and LOG->Warn to use ReportScriptError. 2014-08-02 00:38:18 -07:00
Devin J. Pohly 9916275a8a fix signed-compare warnings
The m_iSelection array could probably be made unsigned... IF we were
confident we never try to assign it a negative number, of which fact I'm
not convinced.
2014-02-08 20:30:33 -05:00
Ben "root" Anderson a040c4a586 1) SOMEONE can't spell "accessible" 2) Global commenting consistency 3) persistance -> persistence 2013-11-30 09:50:54 -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
Ben "root" Anderson 5124186c42 Minor formatting cleanup 2013-11-14 12:03:15 -06:00
Jason Felds c7800078f2 ...but braces are needed instead. 2013-05-05 08:22:45 -04:00
Jason Felds faae62ffb3 No need for an indexer here. 2013-05-05 07:34:04 -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 a3f37dc2b4 The big NULL replacement party part 3.
Getting there I think.
2013-05-03 23:16:39 -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 9f24627bf9 The big NULL replacement party part 1.
This is meant to be a safer alternative since
NULL can often be 0. Let's not rely on that.

And yes, I know this is a lot of files. This is
a safer thing to do in big commits vs for loops.
2013-05-03 23:01:54 -04:00
Jason Felds c67419ecc8 There goes the macro file.
This is one of my bigger commits in this branch.

Still, shouldn't cause a problem.
2013-05-01 23:54:39 -04:00
Jason Felds 77e4c710c4 Good variety of loops. 2013-05-01 23:00:25 -04:00
Jason Felds 09d6203fea The rest of Song Manager's const loops.
I thought I saw some smart pointer opportunities in here.
2013-04-30 19:28:28 -04:00
Jason Felds 25840d5fa8 Only some of the loops.
The rest can be done after work.
2013-04-30 07:38:33 -04:00
Jason Felds d54ae4f70c Simplify this loop while in the area. 2013-04-28 16:28:44 -04:00
Jason Felds a68e4aa3c4 Remove unused loop. 2013-04-28 16:28:11 -04:00
Jason Felds b6f2bf317c Where's my hg commit --amend command? 2013-04-27 15:20:30 -04:00
Jason Felds 7d56192e97 And back to normal with these loops. 2013-04-27 15:19:43 -04:00