quietly turning
fdef606b46
expose RageUtil's BinaryToHex to Lua
...
The hashing functions that CryptManger currently exposes to Lua
return hash strings formatted in binary. Themes using those hash
functions may want to compare hex strings.
RageUtil already had a BinaryToHex utility; this commit exposes it
as a global function, following along with other utility functions
in RageUtil.
2020-09-09 15:16:24 -04:00
teejusb
620ef3609d
Revert to use std::strtof insted of std::stof to make travis happy
2020-04-08 22:41:19 -07:00
teejusb
1d365fbc18
Fix float parsing errors
2020-04-08 22:01:16 -07:00
Prcuvu
de4dc62846
Split Chinese language into Simplified script and Traditional script
...
ArchHooks function modified for Windows.
2020-02-08 15:46:00 +08: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
Kyzentun Keeslala
2b6768aed9
Remove UndocumentedFeature lua function. It has no legitimate purpose and just crashes with a message.
2016-05-20 19:02:54 -06:00
Jason Felds
bec18a0d36
Fix minor windows pedantic warnings.
2016-03-27 22:03:15 -04:00
Jason Felds
537af8d866
Remember to fill in new char's.
...
...we seriously need to use a standard <string>.
*glares at Yaniel*
2015-09-26 21:03:46 -04:00
Jason Felds
cf545a3c01
Remove the need for the RString buffer.
...
For most areas, the call to `c_str()` is plenty.
For `RageUtil`, it's just a matter of new and delete.
2015-09-16 22:29:53 -04:00
Prcuvu
5af37530d4
Rewrite power_of_two, using binary search.
2015-09-02 20:05:02 +08:00
Kyzentun Keeslala
5f50a8ea26
Added get_music_file_length and RageSound:get_length lua functions. Updated changelog.
2015-06-10 14:41:28 -06:00
Kyzentun Keeslala
771e24d1ca
Added kludge to shift tex coords for bottom cap by one pixel to get rid of seam. power_of_two rewritten to use math instead of a while loop.
2015-06-07 18:27:35 -06:00
Kyzentun
1c3db82537
Modified StepsID operators to consider 0 equal to all other hash values. See comment in source for details. Changed operator>>(RString&, int&) functions to be based off a template.
2015-04-10 09:10:51 -06:00
Kyzentun
2f1a348565
Commify handles negative numbers now.
2015-04-02 18:02:38 -06:00
Kyzentun
d789ef7c6b
Exposed commify function to lua and made it handle decimal numbers.
2015-04-02 13:36:41 -06: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
a2798e16f4
More aggressive caching. In general, this makes Stepmania avoid looking in the song directory at all if the song is in the cache, in order to load songs faster. All the RadarValue calculations were also rolled into one to reduce the time needed to build the cache.
2015-03-23 11:35:30 -06:00
Andrew Udvare
36a412f6e4
Add --with-system-pcre; allow building against system PCRE library
2015-01-28 16:11:26 -08:00
Kyzentun
ca4eb65b61
Added lerp, lerp_color, approach, and multiapproach lua functions.
2014-10-23 00:13:13 -06:00
Kyzentun
e3f8d272c1
istream::operator bool() is explicit in C++11, use git diff
2014-09-02 14:33:55 -06:00
Kyzentun
d5878da037
Added Arbitrary Remap option to Alter Menu in Edit Mode.
2014-08-30 13:38:16 -06:00
Ben "root" Anderson
263240debc
Apparently MinGW needs this too.
2013-10-27 15:36:05 -05:00
Jason Felds
a8fe2634ca
Do string validation before parsing.
...
...this is NOT the right place for this.
At some point, we need to either use std::stof directly
and/or just accept that we need to use exceptions.
2013-05-04 13:43:54 -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
490327cf55
Remove the IntToString function, use std.
...
...this seriously didn't belong in Rage.
2013-05-04 11:22: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
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
08218a3a85
Another simplification.
2013-04-27 15:23:31 -04:00
Devin J. Pohly
58aa480016
war on -Werror, part 3: narrowing conversions
2012-12-26 21:12:12 -05:00
Colby Klein
5378173b5a
Fix math.random() never returning > 0.5.
...
All the credit goes to vyhd for both breaking and fixing this.
2012-12-24 15:52:28 -08:00
AJ Kelly
2a2cf23c47
[RageUtil] Add detection of .hg to StripCvsAndSvn.
2012-07-02 21:52:31 -05:00
Mark Cannon
86710c1716
fix compilation for MersenneTwister; generate 2^32 constant with pow(), so it doesn't depend on compiler semantics
2011-08-23 11:39:57 -07:00
Mark Cannon
ed86859798
rewrite MersenneTwister.Random to support negative numbers and generally be more robust
2011-08-22 20:49:50 -07:00
Flameshadowxeroshin
e8d3af2485
Fix Random arguments. Thanks, Saturn2888!
2011-08-23 03:15:51 +00:00
Jason Felds
11c0758568
Force a long long.
2011-08-22 22:27:38 -04:00
Mark Cannon
657217beda
replace math.random and math.randomseed with MersenneTwister
2011-08-22 11:45:45 -07:00
AJ Kelly
8bf7287d78
move comment
2011-08-20 03:47:11 -05:00
AJ Kelly
54c6fd471f
Added PrettyPercent(numerator,denominator) Lua binding. Should probably add the two Commify bindings a bit later on...
2011-08-16 22:28:06 -05:00
AJ Kelly
6621b81aff
insert ECW 'you fucked up!' chant here*
2011-08-16 22:16:26 -05:00
AJ Kelly
f1b22b02ad
comment, cleanup, and whatnot
2011-08-16 21:55:15 -05:00
Jason Felds
3c348a8ac3
Consistent function placement.
...
This will be used for later.
2011-07-17 13:04:36 -04:00
AJ Kelly
ffb6144456
slightly edit assert msg
2011-07-03 16:38:24 -05:00
AJ Kelly
10eb50d93e
pedantic crap
2011-07-03 10:41:44 -05:00
AJ Kelly
94385b7ded
update url
2011-06-24 13:03:01 -05:00
Jason Felds
7f3b8577b3
Prototypes.
2011-06-12 03:42:15 -04:00