sukibaby
21088502b9
Remove clamp macro
...
Doesn't really need to exist since all it's doing is inlining std::clamp.
2024-09-03 20:50:48 -07: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
29a265713f
When sorting course songs by GRADEBEST or GRADEWORST, check if GAMESTATE has a master player before calling SongUtil::SortSongPointerArrayByGrades().
2023-12-13 09:12: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
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
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
quietly turning
3ba2b8ba54
fix Course.cpp for 5_1-new
...
random_up_to() was written for SM5.2 and RageUtil's RandomInt() seems
a suitable replacement for 5_1-new.
2020-06-07 20:09:37 -04:00
Jonathan Albert
f49229809d
Minor fixes
2020-06-07 20:07:49 -04:00
Jonathan Albert
1e6b0d7f35
Fix trail generation in endless mode courses
2020-06-07 20:07:17 -04:00
Jonathan Albert
ff75af1f20
Fix song selection in trail generation (for nonstop/oni)
2020-06-07 20:00:32 -04:00
teejusb
7e3789b131
Integrate C++11 branch into 5_1-new
2019-06-22 12:35:38 -07:00
Colby Klein
4977f29fe3
silence a bunch of msvc warnings
2019-03-28 15:05:07 -07:00
Kyzentun Keeslala
3b5a1e88e0
Check entry id in GetCourseEntry. Add GetNumCourseEntries.
2017-07-09 17:16:47 -06:00
blindbox
de5baf2607
Properly add songs that are missing a Medium difficulty to the Endless Course
2016-02-29 11:07:37 +08:00
blindbox
8cc84ebdda
Isolated Endless Course from other courses in GetTrailUnsorted
...
This should fix stepmania/stepmania#1020 .
2016-02-29 11:03:16 +08:00
Abdullah
a580da2183
Partially fix song repetition in generated courses.
...
The old algorithm for generating courses has a tendency to repeat songs.
This commit prevents that from happening. Songs will instead shuffle, and will
only repeat if the current song list has finished.
This is a partial fix, since for some reason, the method responsible
for getting all the songs in a song group is not doing its work properly.
That means for a course that's supposed to have a 100 songs, only 95 of them
would appear. The other 5 will never appear, and the last 5 will be a repeat
of the first 5 songs.
2016-02-04 17:51:32 +08:00
Jason Felds
3d6ef83a88
Ensure we get properly ranked courses.
2015-10-18 09:19:56 -04: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
Kyzentun
bcb2589114
Fixed endless courses to make them repick on repeats and not crash after repeating.
2014-09-10 02:44:49 -06:00
Kyzentun
2e43a70752
Fixed Course::GetTotalSeconds to work on courses that don't have a medium difficulty. A course with only double charts was probably the one that made the crash manifest.
2014-08-02 00:38:39 -07:00
Ben "root" Anderson
fdbedaee06
Now how did I manage to forget that.
2014-01-14 21:15:58 -06:00
Ben "root" Anderson
1cca4aa309
Check extra carefully that courses are actually playable.
2014-01-14 21:14:56 -06: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
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
905e7bdedd
Simple one.
2013-05-01 22:01:18 -04:00
Jason Felds
c07d4cf78f
Let Mac OS X have goodies.
2013-04-29 23:37:10 -04:00
Jason Felds
e6e471d2df
Goodies! (Except for Mac)
2013-04-28 22:48:08 -04:00
Jason Felds
a7377009d0
Commit 7e1d266: lots of loops.
...
Going to try that any_of thing again.
2013-04-28 18:21:20 -04:00
Jason Felds
85dae04da5
Again, auto can come in handy.
2013-04-27 23:58:35 -04:00
Jason Felds
46d3095877
Replace index version with for each version.
...
I was already in this file: may as well.
2013-04-27 13:21:08 -04:00
Jason Felds
ed0600fa36
Another for loop to f--white space!!
2013-04-27 13:18:54 -04:00
Devin J. Pohly
bd0e2074ad
replace ASSERT(0) with useful fail messages
2012-12-27 16:59:35 -05:00
AJ Kelly
058c90aceb
[Course] Added AllSongsAreFixed() Lua binding.
2012-05-14 00:25:58 -05:00
AJ Kelly
39f3a978eb
I hate when I miss small things.
2011-08-21 19:36:18 -05:00
AJ Kelly
ecaee24102
I'm dumb :(
2011-08-21 19:35:51 -05:00
AJ Kelly
38625e55d8
[Course] Add IsPlayableIn(StepsType) and IsRanking() Lua bindings.
2011-08-18 23:54:01 -05:00
AJ Kelly
6bdaf5c92a
[Course] Bumped up max edit course title length to 16 (still feels too short). Also added #DESCRIPTION tag and Course:GetDescription() Lua binding.
2011-07-21 16:17:48 -05:00
Jason Felds
dbdab4759e
[Xcode4] May as well fix switch warnings.
...
Still need some assistance for the linker error.
2011-07-20 11:11:04 -04:00