Commit Graph
5229 Commits
Author SHA1 Message Date
sukibaby 2e2d49393b Replace lrint(x) with static_cast(x+0.5)
Update 9 files

Update RageSoundReader_Extend.cpp
Update RageSoundReader_Preload.cpp
Update RageSoundUtil.cpp
Update RageSoundReader_ThreadedBuffer.cpp
Update RageSoundReader_SpeedChange.cpp
Update RageSoundReader_Resample_Good.cpp
Update RageSoundReader_Merge.cpp
Update RageSoundReader_Chain.cpp
Update RageSoundMixBuffer.cpp
2024-05-03 23:17:59 -07:00
Gareth Francis 99e3d10775 Reduce rate of X11 screensave interrupt to once/minute 2024-04-19 00:29:35 -07:00
Arthur Eubanks bdafbd4660 Fix some clang warnings
-Wunqualified-std-cast-call and -Wsign-compare.
2024-04-17 00:20:03 -07:00
phantom10111 481161574e PulseAudio: Report actual audio playback position
PulseAudio driver used to report position of last frame written to audio stream
instead of actual playback position. This kind of worked, since on average the
write position doesn't diverge too much from actual elaped time, but it can
result in note stuttering and in general isn't very accurate. Change the
implementation to use actual playback position from PulseAudio stream.

Remove some compatibity code with old PulseAudio, since version 0.9.10 was
released in 2008.

Also, as an optimization to avoid unnecessary memory copying, use
pa_stream_begin_write() to mix audio directly into PulseAudio memory.
2024-04-12 22:40:41 -07:00
phantom10111 cacaded0cd Windows: Set console output codepage to UTF-8 2024-04-12 22:40:09 -07:00
phantom10111 3df79a3f11 Windows: Remove old mapconv and verinc project files
mapconv is being built by CMake so no need to keep its project files in the
repo. verinc isn't used anymore so it can be removed completely.
2024-04-12 22:40:09 -07:00
phantom10111 58a45d91f4 Windows: Compile with /utf-8 flag
Add /utf-8 flag to compilation on MSVC. This flag makes sure that source files
and static strings included in the application are UTF-8 strings.
2024-04-12 22:40:09 -07:00
phantom10111 9a55cb99c1 Windows: Add manifest with UTF-8 code page specification
On Windows 10 versions starting with 1903, this manifest will allow Win32 -A
family of functions to accept UTF-8 strings as arguments.
2024-04-12 22:40:09 -07:00
phantom10111 7dd50cf995 Windows: Generate version number in resource file
Windows executable had an old version number hardcoded in the resource file.
Automatically generate a file with correct version set.
2024-04-12 22:40:09 -07:00
phantom10111 48e797bf35 Move generated directory to build directory
StepMania generates some files during build but it's a bit unusual to generate
them in source directory instead of build directory. Move them to build
directory and remove src/generated from .gitignore.
2024-04-12 22:40:09 -07:00
Gareth Francis 85bac5506e Prevent sound fade in/out from hitting assertion in fapproach 2024-04-11 10:59:03 -07:00
Gareth Francis befae57e73 InputHandler_Linux_Joystick cleanup 2024-04-10 20:17:11 -07:00
Gareth Francis ef86cbbda3 Remove limit of 4 joysticks in InputHandler_Linux_Joystick 2024-04-10 20:17:11 -07:00
Gareth Francis 7009a16dea RageUtil::UnicodeUpperLower: Prevent negative characters from segfaulting under GCC 2024-04-10 14:09:10 -07:00
phantom10111 208494b735 Fix coloring of BitmapText with overlapping attributes
When AddAttribute() is called multiple times with overlapping ranges, old
attributes need to be removed and/or fixed. Otherwise the old colors might
show up when the text is rendered.
2024-04-09 00:34:47 -07:00
phantom10111 17c4e7a2ff Reset input redirection on screen change
It's possible for LUA to redirect input and not bring it back when screen is
ending (and there are existing bugs like this in Simply Love). Considering that
each screen is a separate entity, it seems like this shouldn't be possible and
each screen should handle redirection separately. Split redirection state per
each screen in the stack and clear it once screen is ending.
2024-04-04 11:16:51 -05:00
Curtis Rueden ce3cb266a1 Guard against division by zero crash
Closes #197.
2024-04-03 12:26:27 -05:00
teejusb 3138447138 It's fine to play tick/metronome for failed players. 2024-03-22 15:18:53 -07:00
SugoiFactory 7ac42c7f73 Don't skip high scores with a 0 in the Score field
Since itgmania is storing white counts in the Score field of stats.xml, ignoring these scores will eliminate quints when retrieving high scores.
2024-03-20 03:30:50 -05:00
phantom10111 c0c0d58219 Fix coloring of multiline BitmapText
BitmapText internally stores characters with newlines removed, since they don't
need to be rendered. Due to this, BitmapText::AddAttributes() needs to
recalculate attribute positions and lengths in order to apply them in the
correct place. Unfortuantely the code would calculate the position incorrectly
and completely ignore length. Fix it so that everything is correct even in
multiline text.
2024-03-12 16:15:48 -07:00
hayoreo 338fdd8892 Add pump mirrors and language. 2024-03-06 16:10:21 -08: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
Michael Votaw f8ce3c7db2 Explicitly get song bpm when checking if song matches songCriteria (m_fSpecifiedBPMMax and m_fSpecifiedBPMMin are only set if #DISPLAYBPM is used in simfile) 2024-03-06 01:45:26 -08:00
Michael Votaw 44d3711743 Removing already outdated comment 2024-03-06 01:45:26 -08:00
Michael Votaw dcb1a2e3db Equals signs also need to be escaped when parsing #SONGSELECT parameters. 2024-03-06 01:45:26 -08:00
Michael Votaw bf5404a71a CourseWriterCRS now correctly escapes control characters for certain parameters
CourseLoaderCRS handles escaped control characters and commas
Added new parsing functions to CourseLoaderCRS, ParseCommaSeparatedList, and ParseRangedValue
2024-03-06 01:45:26 -08:00
Michael Votaw e8947d9f70 Added a new SmEscape parameter to allow us to specify what characters to escape (defaults to '\\', ':', ';')
Added new SmEscape function to handle escaping a vector of strings
Added SmUnescape() to remove the '\\' preceding an escaped character.
2024-03-06 01:45:26 -08:00
Michael Votaw 1d332bf960 Modified MsdFile::ReadBuf() so that escaped characters are still skipped when bUnescape == false
As of this commit, this won't affect anything except CourseLoaderCRS, because everywhere else is passing `true` for the bUnescape parameter.
2024-03-06 01:45:26 -08:00
Michael Votaw 68e0674164 Default bUseSongSelect to false when initializing CourseEntry (otherwise it might be true, which causes CourseWriterCRS to write the cache incorrectly) 2024-03-06 01:45:26 -08:00
Michael Votaw 79ddb377ad Removed comments to myself 2024-03-06 01:45:26 -08:00
Michael Votaw 5665d08a5f Removed now un-used CourseLoaderCRS::ParseCourseSongSort
Replaced '..' with '-' for ranged parameter delimiter
2024-03-06 01:45:26 -08:00
Michael Votaw 5b76ab1ba9 Uncommenting these lines from the original #SONG parsing, because I'm not sure why I commented it out to begin with. 2024-03-06 01:45:26 -08:00
Michael Votaw 7831c42c83 Instead of calling rnd(), just select the average between iMaxDist and iMinDist.
This fixes an issue where a Course entry that only specifies a meter range will potentially select different songs for each difficulty.
2024-03-06 01:45:26 -08:00
Michael Votaw d73e210f57 Added Artists, min/max bpm, min/max duration to CourseEntry::GetTextDescription() 2024-03-06 01:45:26 -08:00
Michael Votaw e657a75153 Added OldStyleStringToSongSort() function to map best/worst/gradebest/gradeworst to their SongSort counterparts.
Added CourseLoaderCRS::SetCourseSongSort() to parse and set SONGSELECT's SORT parameter.
2024-03-06 01:45:26 -08:00
Michael Votaw 84553d4a50 Refactored code for writing #SONG entries in CourseWriterCRS
Added method for writing #SONGSELECT entries
Added new boolean flag bUseSongSelect to CourseEntry
Added new function StringToSongSort()
Renamed "LIVES" to "GAINLIVES"
2024-03-06 01:45:26 -08:00
Michael Votaw be87de401a Added additional criteria to StepsCriteria and SongCriteria
Added new m_sSongName property to Song class
Slight refactor in Song::LoadSongFromDir() to set m_sSongName
Implemented the basics of #SONGSELECT course parameter
2024-03-06 01:45:26 -08:00
Michael Votaw 343f2de657 Changed SongCriteria.m_sGroupName to a vector m_vsGroupNames, to allow for the potential to select a song from more than one group. 2024-03-06 01:45:26 -08:00
Michael Votaw f44357c3f5 Added BPMRANGE song option for Courses.
Started breaking out some of the logic in CourseLoaderCRS into smaller functions for readibility.
2024-03-06 01:45:26 -08:00
teejusb 0c1115350d Allow setting the alpha of the beatbars 2024-03-03 00:08:55 -08: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
glitchbear ad5f3e0653 Windows support for fullscreen borderless window mode 2024-03-02 23:47:12 -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
Sergio Pérez Fernández ec33a08ca5 Renamed LinuxInputJoysticks to InputDeviceOrder 2024-02-21 12:29:26 -08:00