Commit Graph

33 Commits

Author SHA1 Message Date
sukibaby f57c71bd23 Ensure a consistent definition of TimingSegment::EPSILON
Since the EPSILON variable in the header file was declared but not assigned any value, it could lead to undefined behavior or calculation errors when the variable is used without initialization.  This ensures a consistent value is always used and is also defined at compile time for further safety.
2024-12-24 22:42:58 -08:00
Martin Natano bacecae1f7 Decouple <vector> 2023-04-21 22:13:41 +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
teejusb 7e3789b131 Integrate C++11 branch into 5_1-new 2019-06-22 12:35:38 -07:00
Kyzentun Keeslala 9739fd417c Cast GetUnit to unsigned int in SpeedSegment::ToString to avoid crashing in ssprintf. 2015-11-18 20:07:49 -07:00
Kyzentun 2fc1c51389 Changed TimingData Lua API to not return strings that will be immediately be parsed into numbers. 2014-03-09 10:19:52 -06: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 7bc9295508 Expand to two decimals.
The reason is due to BPMSegments and their storing of BPS rather than BPM.
2013-01-06 21:12:28 -05:00
Mark Cannon d2ed01b94c compilation fixes for Visual Studio 2011-09-15 18:59:07 +00:00
Mark Cannon 8099e25dcc stage 3 of TimingData changes: changed external interface, enforce encapsulation more strictly 2011-09-15 03:28:58 +00:00
Mark Cannon df9c4d8142 segment renovation stage 2: redefine TimingSegments as simple structs, standardize names and functions, use only rows for constructors (we'll limit allocation through TimingData::AddSegment in the near future) 2011-09-11 17:13:10 +00:00
Jason Felds 4d4c0f5bd1 [timing] Start the break-age.
48 compile time errors. This will be fun.
2011-07-27 22:20:52 -04:00
Jason Felds 01dacd9746 [timing] More abstraction.
This commit has 2 caveats.

1) Stops and Delays are treated the same in the editor right now.
2) TimingSegments.cpp: XToString should not require NUM_TimingSegmentTypes.

Ideas?
2011-07-14 23:54:06 -04:00
Jason Felds 1e624b65aa Remove the templated parts of segments.
The templated constructors seem to be fine:
it's just int vs float.
2011-07-14 11:00:43 -04:00
Jason Felds 08d5f8f722 Add Miss Combo support in #COMBOS tag. 2011-07-09 02:28:15 -04:00
Jason Felds e19a210926 I don't like shadowed variables. 2011-07-04 21:22:05 -04:00
Thai Pangsakulyanont 9a1a824f22 let SpeedSegment scale itself.
also fixes the bug where the segments outside of the scaling region are scaled too.
2011-07-01 22:40:57 +07:00
Thai Pangsakulyanont 68f95ce056 Refactor TimingData::ScaleRegion(), fixes 297. 2011-06-26 13:43:30 +07:00
Jason Felds df6a00b53e Stops (and Delays) now templated.
This is all of them at this present time.

At some point in the future, we should make
DelaySegments separate from StopSegments.
2011-06-01 09:50:34 -04:00
Jason Felds 50e93045cc Scroll Segments Satisfied.
Just the Stops and Delays...in one segment.
Yeah, maybe those should be split up at some point.
2011-06-01 08:44:09 -04:00
Thai Pangsakulyanont 6f83556da7 fix the template mess! it now builds on windows but not sure if it works or if it will build on other platforms. 2011-06-01 14:21:57 +07:00
Jason Felds 3b2f9510cd Right, how'd I forget global.h in here?!? 2011-05-31 22:25:53 -04:00
Jason Felds f9eb6fb387 Speed Segments Satisfied. 2011-05-31 15:27:27 -04:00
Jason Felds b1eab10594 Time Signatures, the other big one. :D 2011-05-31 14:27:55 -04:00
Jason Felds 642ec5ac81 Minor cleanup before I dive back into segments. 2011-05-31 14:04:35 -04:00
Thai Pangsakulyanont 1d2dd19ab1 Yeah, BPM segments, big one :D 2011-05-31 23:41:39 +07:00
Jason Felds 714427f154 ComboSegments brought in.
Five to go I believe.
2011-05-31 11:45:25 -04:00
Jason Felds da73396895 Labels templated.
Six more to go.
2011-05-31 11:22:21 -04:00
Jason Felds 1fcf290571 Warps are properly templated.
Seven more to go I believe.
2011-05-31 10:59:18 -04:00
Thai Pangsakulyanont f7e849f045 further refactorization of TimingSegments (use more templates!) 2011-05-31 19:39:28 +07:00
Jason Felds 8a315634dc Bring TickcountSegments to refactored level.
I wonder how many of the 8 will be claimed upon wakeup.
2011-05-31 01:20:22 -04:00
Jason Felds 1d3000e520 FakeSegments refactored.
Few things of note:

1) Slowly going away from hungarian notation.
2) Trying to respect public/private members.
2a) Yes, structs can work like this.
3) Trying to not require horizontal scrolling.

If anyone else wants a crack, go ahead:
we have 9 segments left. :)
2011-05-31 00:51:25 -04:00
Jason Felds e90b81d3c3 Working towards refactoring TimingSegments.
Hope I took care of the Windows 20** files right.
2011-05-31 00:17:46 -04:00