Commit Graph
69 Commits
Author SHA1 Message Date
Crash Cringle 6d6dc86211 Ensure Group offset is always applied 2025-03-25 23:28:08 -07:00
Crash Cringle 0cbc92ff0f explicitly initialize m_group to nullptr 2025-03-22 19:45:54 -07:00
Crash Cringle 0270cda54d Add additional NULL checks just in case 2025-03-22 12:02:04 -07:00
Crash Cringle ce7cef6d90 Only check for songs if we're using a memory card 2025-03-22 12:02:04 -07:00
Crash Cringle 7d5a62a537 Add Group() for USB songs 2025-03-22 12:02:04 -07:00
Crash Cringle e9e228fee0 Don't constantly read from Stats.xml while on the bookkeeping screen... 2025-03-21 19:48:12 -07:00
Crash Cringle 4f0febb57c Rename DefaultSyncBias --> DefaultSyncOffset 2025-03-18 07:28:50 -07:00
Crash Cringle 6b50f9a90c Rename MachineSyncBias --> DefaultSyncBias 2025-03-16 15:42:41 -07:00
Crash Cringle 9529bfd142 Change MachineSyncBias prefs to an enum SyncBias, Changing this song triggers a reload of songs, added new option effect for reloading songs 2025-03-16 15:42:41 -07:00
Crash Cringle c6ad4685a7 Add null checks for all ->GetGroup->getsomething calls 2025-03-09 10:05:01 -07:00
Crash Cringle 031cb7c8a2 Capitalize NULL String 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 ff06dda985 Partially revert 36892b4 (Create RandomSeed.h) in BitmapText.
This appears to have unintended effects on jitter, distort, and rainbowscroll. Reverted for now for reevaluation on implementation here later.
2025-03-08 23:17:16 -08:00
Crash Cringle ca1a7a0dc4 Prevent a crash when loading a group with no additions in SongManager::LoadSongDir
When reloading and only loading additions, ensure we do not delete/readd groups that were already loaded.
2025-03-07 16:51:26 -08:00
Crash Cringle c3886adb07 Update Banner handling for new sorts 2025-03-03 23:36:06 -08:00
Crash Cringle b482c26612 Give these sorts sections so it's clear where they start and end 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 b770e9ad6b Use Log->Warn 2025-03-03 23:25:32 -08:00
Crash Cringle 17e4953d54 Add Luadocs for Group 2025-03-03 23:25:32 -08:00
Crash Cringle dbbcc57112 Explicitly require and use capital NULL and ITG everywhere for sync bias, comment fix, nullptr check for group 2025-03-03 23:25:32 -08:00
Crash Cringle 35570a0880 Condense trim/check empty pack.ini logic to vector looping 2025-03-03 23:25:32 -08:00
Crash Cringle 8f6d5b44b9 Move sync offset application to song load (as early as possible) 2025-03-03 23:25:32 -08:00
Crash Cringle 9d61cb4c06 Okay we use -9ms here because this counters the +9ms folks add to their charts. Ensure we clear the series map when freeing songs 2025-03-03 23:25:32 -08:00
Crash Cringle 6fbbf931ac Use std::string instead of RString for mappings 2025-03-03 23:25:32 -08:00
Crash Cringle 218d5734a3 Change group map to an unordered_map 2025-03-03 23:25:32 -08:00
Crash Cringle 830bf1bb8d Change series map value from a vector to an unordered set, remove series prefixing, ensure always defaulting to group disk name for sorting 2025-03-03 23:25:32 -08:00
Crash Cringle dd60d36093 Implement changes from feedback 2025-03-03 23:25:32 -08:00
Crash Cringle 694a724770 Move ASSERT_Ms to debugging and replace with warns, include <array>
(See feedback in PR)
Co-authored-by: sukibaby <[email protected]>
2025-03-03 23:25:32 -08:00
Crash Cringleandsukibaby 437f72b13d Update src/ScreenOptionsMasterPrefs.cpp
Co-authored-by: sukibaby <[email protected]>
2025-03-03 23:25:32 -08:00
Crash Cringleandsukibaby 0b3ed6d4f9 Update src/SongManager.cpp
Co-authored-by: sukibaby <[email protected]>
2025-03-03 23:25:32 -08:00
Crash Cringleandsukibaby fc98959db4 Update src/SongManager.cpp
Co-authored-by: sukibaby <[email protected]>
2025-03-03 23:25:32 -08:00
Crash Cringle ec814a6b74 Add version to Pack.ini, auto populate this value in the Pack.ini if it isn't manually provided 2025-03-03 23:25:32 -08:00
Crash Cringle 48b5b35e23 Rewrite a few comments 2025-03-03 23:25:32 -08:00
Crash Cringle 53a26f2fa4 Add some nullptr handling 2025-03-03 23:25:32 -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 ea588c8504 Remove extra fields for now 2025-03-03 23:25:32 -08:00
Crash Cringle e8f0d55d6e Add SONGMAN:HasGroupIni(string groupName) which returns true/false 2025-03-03 23:25:32 -08:00
Crash Cringle 05cd7ed922 reimplement "SyncBias" as something that tells us the sync of the pack so we may adjust accordingly rather than the blanket sync to apply to the pack. 2025-03-03 23:25:32 -08:00
Crash Cringle f59a5b1e72 Rename group.ini back to pack.ini to avoid conflict with the existing waiei standard. See: https://github.com/waiei/Group.ini-lua 2025-03-03 23:25:32 -08:00
Crash Cringle a7cb3b0264 Remove unnecessary GetSongs accessor from Group object 2025-03-03 23:25:32 -08:00
Crash Cringle 13e6aaacb3 start addressing review/feedback 2025-03-03 23:25:32 -08:00
Crash Cringle 00342feadc Add new preference: DefaultGroupOffsetSeconds to dictate the default sync bias on the machine when no group.ini is present (or if there is no SyncOffset field in said file).
- Generally Supports either ITG (9ms) or NULL (0ms).
- Alternatively, one could edit the preference manually to put a different value
- Name/Description probably worth ironing out
2025-03-03 23:25:32 -08:00
Crash Cringle 835ca35065 Ensure the Group Offset is applied when Reloading a Song from Disk 2025-03-03 23:25:32 -08:00
Crash Cringle fe1bfbdde2 Fix the AutoSync Relay showing Global Offset instead of the song Offset when Auto Syncing
- Unrelated to group.ini
2025-03-03 23:25:32 -08:00
Crash Cringle 01eea5cd42 Remove additional leftover debug message 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 520173ef5d Safe delete Groups 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 096d3093e4 Add Group files to cmake 2025-03-03 23:25:32 -08:00
Crash Cringle 5abaf5318a Move group into its own class, add Credit and AuthorsNotes fields, Begin exposing methods to lua 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 e55475a295 Add enums for ITG/NULL in pack.ini for SyncOffset 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
Crash Cringle bc65d16c4a Move LastOpenSection declaration outside of if/else, add clarity to comment 2024-07-07 16:14:07 -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
Crash Cringle 980c3a4c3a MergeFromOtherHSL() now 'Removes All But One Of Each Name' per preference
When merging two high score lists, the MergeFromOtherHSL() function only called ClampSize() but did not also call RemoveAllButOneOfEachName. This behavior was okay before because RemoveAllButOneOfEachName() was called on every single song on the machine every set. Since this is no longer behavior, we need to make sure this method calls this otherwise we may end up with a merged leaderboard that has the same person occuring more than once.
2023-12-13 08:30:33 -08:00
Crash Cringle efaf38b8ed Fix for "10th score" leaderboard bug, Reduce load from GAMESTATE::StoreRankingName()
- Fixes bug where 10th scores get erased when two players play the same song multiple times and rank on the leaderboard more than once
- Only clamping leaderboards and deduping high scores for songs/courses once overall instead of once per player
- Instead of looping through every song and course on the machine multiple times -> Only loop through the songs/course played in the past session
2023-03-16 18:19:09 -07:00
Crash Cringle f60c1c7f82 Add new Sorting Capabilities for Profile list 2023-03-13 19:56:07 -07:00
Lamar Cooley f62938787a Add new Preference, Maximum Number of Credits
Grant users the ability to change the maximum amount of credits available rather than the constant cap at 20.

(cherry picked from commit 2ec2355d7a7d9fec9410cf6b7d2b5c31a4406074)
(cherry picked from commit 48245ab51600ede16096e70e27c94345918eaed7)
2023-01-24 13:04:27 -08:00