Commit Graph

176 Commits

Author SHA1 Message Date
teejusb 7e3789b131 Integrate C++11 branch into 5_1-new 2019-06-22 12:35:38 -07:00
Jason Felds edabf4605b Clean up three sets of warnings:
* Ensure all switches have a default when working with enums.
* Match defined new[] calls with delete[] calls.
* Respect variable initialization order.
2016-03-24 18:30:29 -04:00
Kyzentun Keeslala ae5ff0724a Added Clear timing in region option to timing menu in edit mode. Disabled pasting clipboard timing if it's not safe to fix crash. 2016-01-18 11:48:50 -07:00
Jason Felds 166e4c8287 Allow optional logging of timing segment mods.
For those with many songs, it gets annoying.
2015-11-01 06:49:31 -05:00
Prcuvu d98a25797e Fix GCC warnings on Linux. 2015-10-08 12:51:28 +08:00
Matt McCutchen 343bbd0e56 Fix interaction between global offset and music rate.
The global offset is a correction for audio latency, which is measured
in wall-clock time, but TimingData elapsed time values represent offsets
into the sound file.  To get the offset in the sound file that
corresponds to the wall-clock time of the global offset, we have to
multiply by the music rate.
2015-10-03 22:21:21 -04:00
Kyzentun bac4356672 Changed TimingData to always return the entry before the closest one when using the lookup table to avoid various problems that occur only when the current time is exactly on the current entry in the lookup table. 2015-04-11 22:50:06 -06:00
Kyzentun 9658252bc3 Merge pull request #543 from kyzentun/edit_timing_data
Shift timing data in Edit Mode
2015-04-06 22:50:56 -06:00
Kyzentun 1e668c660f Removed _t from typenames because of POSIX. Fixed bug that made a warp and stop on the same row skip the marker in TimingData. 2015-04-06 21:49:46 -06:00
Kyzentun 9e5081476f Added timing menu options to Edit Mode that allow shifting and copying timing segments of a chosen type in the selected region or everywhere below the cursor. 2015-04-04 09:10:00 -06:00
Kyzentun 2b4cabfb57 Added keybinding for reloading songs on SSM, and lua function for doing it from lua. Added NeverCacheList preference for WIP groups that should never be cached. Rewrote TimingData::CopyRange in preparation for using it to copy/paste timing data from the selected area in edit mode. 2015-03-31 15:20:37 -06:00
Kyzentun e08182446e Fixed bug in TimingData lookup table for elapsed time. The entries were being added with the time for lookup when they should have been added with the beat. Also fixed the way GetElapsedTimeInternal uses FindEvent so that FindEvent won't spuriously find the marker when building the lookup table. 2015-03-30 22:41:40 -06:00
Kyzentun 2b7ebb3729 Added lookup table system to TimingData so that GetBeatAndBPS and GetElapsedTime don't have to walk through the entire list of timing segments several times every frame during gameplay. 2015-03-14 23:17:35 -06:00
Kyzentun f1229d29cb Made backslash mappable. Fixed mistake in previous AddSegment fix so now it correctly compares to the previous segment again. F7/F8 no longer allow negative bpms to match Edit BPM behavior. 2015-02-16 13:31:21 -07:00
Kyzentun 5900c9ded1 Fixed crash in edit mode from adding a bpm change that makes the bpm change after it redundant. 2015-02-13 02:17:49 -07:00
Kyzentun 474d151041 Changed TimingData GetReturnsNumbers metric to optional boolean arg to the functions. 2014-12-02 11:48:43 -07:00
Kyzentun 321c2cdc62 Added metric for controlling whether TimingData returns numbers instead of strings. 2014-09-10 04:15:44 -06: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
Devin J. Pohly f530fac433 TimingData: don't break indefinite segments when deleting rows
We had BPM hard-coded in, but other indefinite segments (scroll, tickcount,
combo, etc.) were not being preserved, causing editor problems/crashes.
2013-08-30 15:09:49 -04:00
Jason Felds 5298668327 Well, std::array works it seems.
Time for more slow transitioning.
2013-05-05 00:02:40 -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
Devin J. Pohly feb919f0bf Revert memory leak commits
5f7001e: "Added a new branch"
01456ed: "Fixed a lot of memory leaks"
dac4493: "Fixed all remaining memory leaks that I could figure out"
0792db7: "Removed the smnew macro and the call to _CrtSetDbgFlag()"

Some of these caused destructor-time problems due to static initialization
order fiasco and related issues.  Notably, the program would no longer exit on
OSX and had to be killed.

There were probably legitimate fixes in here, but since these are monolithic
commits it's too much work to extract them now.  Let's reapply them
individually and in the forward direction.
2013-04-27 00:05:14 -04:00
Shenjoku b59d3e9a8f Fixed the non-const definition of the TimingData::GetSegmentAtRow() function,
which was missing the class specifier and casting the data wrong.
2013-04-22 22:20:40 -07:00
Shenjoku 0792db752a Removed the smnew macro and the call to _CrtSetDbgFlag() to get ready for
merging with the main branch.
2013-04-19 20:34:11 -07:00
Shenjoku 01456ed0b9 Fixed a lot of memory leaks caused by static globals never getting
deleted and some other objects not getting deleted properly due to missing
destructors.
2013-04-18 21:17:57 -07:00
Shenjoku 5f7001ef0a Added a new branch that implements support for outputting all memory leaks to
the debug output for the Debug and FastDebug project configurations. This
requires replacing all instances of new with a macro, smnew, that defines a
special form of new which outputs file and line number information along with
the memory leak details. This makes finding memory leaks much easier since you
can just double-click the leak in the output window and it will take you to the
line that caused it.
2013-04-17 20:42:29 -07:00
Devin J. Pohly 4f7f4f4a51 TimingData: update misleading comment 2013-02-05 17:09:25 -05:00
Jason Felds 28708187c9 Fakes too. 2013-02-05 17:03:36 -05:00
Jason Felds 0e494a3b44 Address warp issue if never passed a warp yet.
Thanks to phantom again for catching this.
2013-02-05 17:02:39 -05:00
Devin J. Pohly 0ae7b0da85 TimingData: add allowEmpty parameter to TidyUpData. always false for now... 2013-01-23 14:38:57 -05:00
Devin J. Pohly bd0e2074ad replace ASSERT(0) with useful fail messages 2012-12-27 16:59:35 -05:00
Jason Felds e1af1eb2b6 [editorKeysounds] Stop an editor closing crash.
If you close the program while in the editor
in debug mode, it can occasionally cause
a bad access violation with the mutexes.

If someone really wants this back, go ahead and
put it back in.

...this really should have gone in default first.
2012-02-10 19:18:40 -05:00
Jason Felds d55fa26567 Fix warning, ifdef another LOG->Trace. 2011-11-01 22:24:44 -04:00
AJ Kelly 5bde30c176 remove debug logging that I didn't mean to commit 2011-10-29 21:08:54 -05:00
AJ Kelly b8757ace53 not happy with this 2011-10-27 22:30:05 -05:00
Mark Cannon d16c77c1b4 fix log bloating like whoa (wrap every Trace() in TimingData with DEBUG ifdef) 2011-10-07 21:51:04 -04:00
AJ Kelly fb346d1bc2 uncomment a trace 2011-10-01 00:31:28 -05:00
AJ Kelly 7cea3ae90a put these debug print statements into a debug ifdef 2011-09-30 15:16:43 -05:00
AJ Kelly d782518c14 [ScreenEvaluation] Added RollingNumbersMaxComboClass metric. (also removed unused MaxComboNumDigits metric from C++-side) 2011-09-23 01:26:53 -05:00
Mark Cannon 561bdeeeb8 fix unnecessary vector copy 2011-09-22 09:19:20 -04:00
Mark Cannon f0880d6fd2 fix memory leak in TimingData, remove unnecessary structure copies in ScoreKeeperNormal 2011-09-18 19:07:39 +00:00
Thai Pangsakulyanont 9164eccfde oops, it did not erase, but it did not skip. 2011-09-16 21:15:47 +07:00
Thai Pangsakulyanont a03e6f0efa - use a straightforward binary search for GetSegmentIndexAtBeat
- fix a bug where adding a segment with the same value as the old one
  removes the old one [it should just skip adding the new segment].
2011-09-16 21:03:06 +07: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
Mark Cannon 0d4e43f9e3 stage 1 of TimingSegment cleanup: consolidate genericizable code in TimingData, use a proper variable name 2011-09-10 03:08:59 +00:00
Jason Felds 52d7f6c68b Make it better: don't duplicate code. 2011-08-15 19:23:43 -04:00
Jason Felds e26973d71d THERE! 2011-08-15 18:12:12 -04:00
Jason Felds 6e8137500d Partial revert. Restore most delays/stops.
The only thing to fix properly
is when stops and delays share the same row.
2011-08-15 17:54:06 -04:00
AJ Kelly ad9cec03aa [TimingData] Add HasDelays() Lua binding; HasStops() now only checks stops. 2011-08-07 13:48:42 -05:00