Commit Graph

118 Commits

Author SHA1 Message Date
Crash Cringle c6ad4685a7 Add null checks for all ->GetGroup->getsomething calls 2025-03-09 10:05:01 -07:00
Crash Cringle cd73c169ab Rework Pack.ini Sort Title sorting logic to better handle duplicate sort titles (falls back on group name) 2025-03-09 10:05:01 -07:00
Crash Cringle c3886adb07 Update Banner handling for new sorts 2025-03-03 23:36:06 -08:00
Crash Cringle 6201e1ab94 Add Recently Played and Most Played per Profile as sorts 2025-03-03 23:36:06 -08:00
Crash Cringle ac767b3ce8 Move GetGroup to SONGMAN, rename variables consistently, move "pack.ini" to constant var, flip sync bias sign 2025-03-03 23:25:32 -08:00
Crash Cringle 1bf9dd004d Use the Translit field from Group.ini, Migrate Banner code to Group class 2025-03-03 23:25:32 -08:00
Crash Cringle c06059b274 Further Group enhancements.
- Adjust the variable scope of group attributes
- Remove the now redundant GroupBannerPaths vector and replace its usage.
- Migrate ini loading logic to Group class
- Better clarity on comments for Group
- Remove GetTotalSongs in favor of GetSongs.
- Add Year as a value to Group.ini
- Ensure new group and song maps are cleared properly when freeing songs
2025-03-03 23:25:32 -08:00
Crash Cringle 1aa44cacb6 Rename Pack -> Group for consistency. Remove leftover logging and extra lines from debugging.
Misc patches via PR review.
2025-03-03 23:25:32 -08:00
Crash Cringle 798201cce4 Add Pack Offset and Group Banners to pack.ini, Remove debug logging 2025-03-03 23:25:32 -08:00
Crash Cringle 5e6f3378a8 Thrown together Initial working implementation of pack.ini
# Conflicts:
#	src/MusicWheel.cpp
2025-03-03 23:25:32 -08:00
Crash Cringle b6a08130ab When using auto set style we need to ensure that we're showing all the songs that we're telling the user that they're able to see.
- If AutoSetStyle is true then we're showing all compatible styles at once (compatible styles determined by number of players joined)
- Sooooo if 1 player is joined then we'd see Singles, Doubles, & 3-panel charts. (Maybe solo as well?)
- If 2 players are joined we'll see Singles (versus), Routine, and couples charts.

This needs to be reflected in the music wheel so that we're seeing songs with compatible styles. Previously it was checking if the song had steps in the current style which doesnt really apply for AutoSetStyle being toggled.

(cherry picked from commit 1fc4a805b497aa93a965547c688844a30018527a)
2025-02-12 20:04:53 -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 64fa8e9971 MusicWheel::readyWheelItemsData remove ragetimer 2024-08-06 16:16:47 -07:00
Crash Cringle 667d27b361 Fix Level and Preferred Sorts to account for a song being in multiple sections
This commit properly returns you to the correct pack when leaving a folder or returning from another screen.
This is achieved by returning you to your last open section. Previously behavior searched for the first instance of the song in your sort and put you in that section.
2024-07-07 16:14:07 -07:00
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 a7a8f51c33 Ensure the music wheel rebuilds when using SORT_PREFERRED.
The songs for each sort are not updated despite changes that might occur during the session. This commit ensures that the music wheel will be rebuilt when setting the sort to PREFERRED. This is needed because the songs in this particular sort are prone to change during a session because two players can have different preferred songs. Additionally, profiles can change during a session. This commit will properly rebuild the music wheel  when the sort is changed to SORT_PREFERRED.
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
Crash Cringle b16efb06f7 fall through if sorting by player top grades without a profile 2024-02-25 09:36:11 -08:00
Crash Cringle 24876804ef Add Top Grades sort per profile. This allows each player to see their top grades based on the currently used profile.
The present implementation adds 2 new sorts for this, TOP_P1_Grades and TOP_P2_GRADES following the naming convention of TOP_GRADES which returns the machine grades.

I named the sort TopP1Grades rather than TopGradesP1 to prevent the "conflicting" banner error.

Eventually, I'd like to condense this to be 1 sort fed a playernumber or profile parameter in the future.

(cherry picked from commit 731ae501d8a14a196984bf7578afaa9351c22c5c)
2024-02-25 09:36:11 -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 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 4a6b1a743c Enable more compiler warnings and treat them as errors. 2023-02-02 11:54:17 -08: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 4c0aef69dd Remove legacy network code 2022-04-11 14:50:00 -07:00
Arthur Eubanks b88e81a8f5 Don't re-sort sections when sorting by length
Re-sorting causes oddities like
https://github.com/Simply-Love/Simply-Love-SM5/issues/362
2022-03-28 20:11:53 -07:00
RhythmLunatic 12e983ba51 add GetCurrentSections 2020-05-26 22:36:53 -05:00
teejusb 7e3789b131 Integrate C++11 branch into 5_1-new 2019-06-22 12:35:38 -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
Nickito12 d96bcae8de NetRoom/SelectBase/Music lua objects. Scrolling with lua funcs and binded to ctrl+pg up/down. Show prev msgs, binded to pg up/down. Music wheel move, selectmusic screen's select current song, chatbox visibility, input en/disabling and UserList visibility lua functions. (#1394) 2017-02-10 04:58:23 -08:00
Kyzentun Keeslala 8a7b1d407a Ignore auto set style when filtering songs for the music wheel in online mode. 2016-06-29 15:36:48 -06:00
Kyzentun Keeslala 4361bcd7e3 Don't invalidate the current song or steps until after the music wheel has been constructed, so that themes can safely touch it when handling current song changed. 2016-05-19 11:19:55 -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 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 65a1551c6d Changed SetCurrentStyle to unjoin other player when setting OnePlayerTwoSides to fix crash from second joining on SSS and picking double. Changed MusicWheel FilterWheelItemDatas to clear the vector it's putting the filtered data in instead of appending to the end. Updated Polish translation. 2015-02-08 10:33:51 -07:00
Devin J. Pohly 603b9d95fc Allow OnlyShowActiveSection wheel to include current section title
IIDX hides inactive sections, but unlike the current behavior of our
OnlyShowActiveSection metric (based on certain Pumps according to
DaisukeMaster's comment), it retains the section title so that the
section can be closed normally.

New metric: MusicWheel.HideActiveSectionTitle, defaulting to true in
_fallback.  A bit unfortunate, but keeps backward compatibility with the
existing behavior of OnlyShowActiveSection.

If neither metric is true, wheel displays all titles plus the contents
of the active section (if any).

If OSAS is true but HAST is false, wheel displays the active section
title plus its contents, or all titles if no section is active.

If both are true, wheel displays only the active section's contents, or
all titles if no section is active.
2015-02-01 10:09:59 -05:00
Devin J. Pohly f18fa45495 MusicWheel: fix CloseCurrentFolder with OnlyShowActiveSection
Moves all of the wheel-entry-hiding logic into SetOpenSection rather
than prematurely throwing out section headings.  Now when we close the
active section with OnlyShowActiveSection in effect, the headings are
shown rather than an empty wheel.
2015-01-31 10:38:14 -05: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 6b346e8e0b Added MusicWheel:GetSelectedSection. 2014-08-02 00:38:58 -07:00
Kyzentun a74a49af78 Changed many uses of Dialog::OK and LOG->Warn to use ReportScriptError. 2014-08-02 00:38:18 -07:00
Ben "root" Anderson 4e83167450 Fix double meters sort (Bug#1027) 2013-10-24 00:12:49 -05:00
Jason Felds 09dff9834a Remove recursion. Make it public. 2013-06-08 22:28:10 -04:00
Jason Felds 07b9fb6da5 The big NULL replacement party part 6.
...and ', NULL' had even more to replace.
2013-05-03 23:49:23 -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