Commit Graph

43 Commits

Author SHA1 Message Date
Arthur Eubanks 995f0ea8c1 Change some RString methods to free functions
These ones aren't a std::string method. Doing this helps the RString to
std::string migration.
2025-05-17 14:02:12 -07:00
Arthur Eubanks ecfcb11a00 Remove implicit conversion operator from RString to const char*
This is required for the RString to std::string migration.

Mostly automated from https://github.com/aeubanks/rewriter/blob/main/c_str.cc, with some manual intervention required for fixing up `a + b.c_str()` to `(a + b).c_str()`.

Added some overloads for some common global functions like sm_crash to reduce the number of changes required here.
2025-05-15 21:14:54 -07: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 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 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
Martin Natano bacecae1f7 Decouple <vector> 2023-04-21 22:13:41 +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
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
Gareth Francis aeb5c7598f Handle exceptions in int conversions (#2092)
* RageUtil: Add exception-safe wrappers around std::stoi, stol, stoll

* Replace use of std::stoi with exception-safe StringToInt
2021-02-15 12:36:51 -08: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
Jason Felds 16c6e9aec3 Fix loading WORST courses. 2015-10-17 20:14:55 -04:00
Jason Felds f5c877cbb6 Replace StringToInt with the std version.
Again, RageUtil isn't the right home.
2013-05-04 11:59:25 -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
Jason Felds 2b12717c02 One loop here. 2013-05-01 22:01:42 -04:00
AJ Kelly c7fab6014f [Various] Allow loading of *.jpeg in addition to *.jpg. 2011-12-17 03:21:12 -06:00
AJ Kelly d3634e343f remove unneeded logging 2011-09-20 17:40:07 -05:00
Mark Cannon a8f22ef178 fix undeclared function and typo (seriously, please at least try to compile your code before committing) 2011-09-11 17:12:09 +00:00
Flameshadowxeroshin 64f418c5d7 fix course bug 2011-09-11 15:47:11 +00:00
AJ Kelly 85c9a258a6 remove todo that won't happen 2011-08-03 21:19:54 -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
AJ Kelly 070409355a [CourseLoaderCRS] Don't load BEST# and WORST# where # is greater than the number of songs installed. Fixes issue 373. 2011-07-07 13:20:24 -05:00
Jason Felds 750b688de4 Consistent insensitive string comparisons.
This seems to reduce the need for a #define,
but I need someone on the Windows side to check.
2011-05-11 16:48:51 -04:00
Jason Felds da51e26d07 Standardize conversion processes.
Too many arguments for or against the many methods:
stick to one inside a common function.

This commit will force recompilation of many files.
2011-05-11 15:58:31 -04:00
AJ Kelly 6aec949c06 [Course] Added #SCRIPTER tag and GetScripter Lua binding. 2011-04-30 23:30:58 -05:00
AJ Kelly 1d0fb92ebe [CourseLoaderCRS] Fixed loading of Player's Best/Most Played courses, probably others too. 2011-04-23 16:04:40 -05:00
Jason Felds a085d0d1da Line endings...be normalized! 2011-03-17 01:47:30 -04:00
Jason Felds b0fa4422f2 Course*CRS.* doxygen-ated. 2011-02-12 22:20:11 -05:00
AJ Kelly 0755d0f3b9 comment/whitespace editing 2011-02-09 17:42:16 -06:00
AJ Kelly 53b1f9a31a references to DWI's behaviors 2011-02-08 19:58:16 -06:00
AJ Kelly b40f144f1a small comment/cleanup 2010-07-03 18:07:17 -05:00
AJ Kelly 4ec98bc30c up the maximum size of an edit course from 30KB to 32KB.
allow the #BACKGROUND tag to be read from .crs files.
2010-05-22 10:21:24 -05:00
AJ Kelly 3e51544930 Initial commit. 2010-01-26 21:00:30 -06:00
Devin J. Pohly 80057f53cd smsvn -> ssc-hg glue: rearrange directory structure 2013-06-10 15:38:43 -04:00