Commit Graph

155 Commits

Author SHA1 Message Date
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
Jason Felds 07a74caace [timing] The gamble paid off. :D 2011-07-27 23:55:58 -04:00
Jason Felds ddf09cac60 [timing] It builds again. Time for failure. :D 2011-07-27 23:43:52 -04:00
Jason Felds 18ff542910 [timing] All but the Beat <-> Time functions.
Alright Thai...let's see if I can modify your work properly.
2011-07-27 23:32:37 -04:00
Jason Felds b6fe8a0de0 [timing] Notes* mostly covered. 2011-07-27 22:33:50 -04:00
Jason Felds 9505e09f58 Add the copy/paste selected timing data feature.
Not perfect at this stage, but...well, everyone wanted it.
2011-07-26 16:05:14 -04:00
Jason Felds 4eeb2e6442 Only one loop needed. 2011-07-26 14:13:50 -04:00
Jason Felds bf5c3791cc This can be const: no members changed. 2011-07-26 14:13:10 -04:00
Jason Felds 480cda836e Allow for checking if the TimingData is empty.
AKA, no segments in use.

Again, this is mainly for the editor.

As for why a lowercase empty? Blame vectors.
2011-07-26 14:10:51 -04:00
Jason Felds 4f7bddd8cc Seriously, how do we remove sm-ssc.app?
I can't kill this thing.
2011-07-26 13:56:23 -04:00
Jason Felds 75b3a67e2a Add a function to copy TimingData over a range.
This is primarily for the editor. Still, it may
have other uses.
2011-07-26 13:41:41 -04:00
Thai Pangsakulyanont 8bad512433 Fix performance issue: remove the slow assertion code.
GetDisplayedBeat and GetDisplayedSpeedPercent are called so many times in one frame
so they need to be as fast as possible.
2011-07-27 00:29:22 +07:00
Jason Felds 679b81705b Not needed. 2011-07-26 12:57:48 -04:00
Jason Felds 5c34929600 Fix timing segment scaling.
When in doubt, use the direct approach.
2011-07-26 11:35:58 -04:00
Jason Felds d96a300a50 Remove out of bounds errors.
......I REALLY need a vacation now.
2011-07-21 17:25:02 -04:00
Jason Felds 59686a46b0 Fix out of bounds error. 2011-07-20 15:29:24 -04:00
Alberto Ramos 3b475db699 why 2011-07-19 23:42:32 -06:00
Alberto Ramos 0c1a33cbe3 things
ksfs are still broken
2011-07-19 18:35:29 -06:00
Jason Felds 0944948cad Fix Stops and Delays on the timing bar. 2011-07-17 23:58:22 -04:00
Jason Felds 48226f2027 No longer store #NOTES in cache.
Use the #STEPFILENAME tag to access the files
as appropriate.

To the betting pool fans: file cache version is 192.
2011-07-17 16:06:40 -04:00
Thai Pangsakulyanont e6be564be8 [timing] make sure the segments are sorted 2011-07-17 13:03:21 +07:00
Thai Pangsakulyanont de3916297e it runs, but scrolls stop working. 2011-07-17 12:30:09 +07:00