Allow optional logging of timing segment mods.

For those with many songs, it gets annoying.
This commit is contained in:
Jason Felds
2015-11-01 06:49:31 -05:00
parent 020ecf64ae
commit 166e4c8287
3 changed files with 10 additions and 4 deletions
+3
View File
@@ -38,6 +38,9 @@ option(WITH_MP3 "Build with MP3 Support." ON)
# Turn this option off to disable using OGG files with the game.
option(WITH_OGG "Build with OGG/Vorbis Support." ON)
# Turn this option on to log every segment added or removed.
option(WITH_LOGGING_TIMING_DATA "Build with logging all Add and Erase Segment calls." OFF)
if(NOT MSVC)
# Turn this option off to disable using FFMEPG.
option(WITH_FFMPEG "Build with FFMPEG." ON)
+4 -4
View File
@@ -535,7 +535,7 @@ TimingSegment* TimingData::GetSegmentAtRow( int iNoteRow, TimingSegmentType tst
static void EraseSegment( vector<TimingSegment*> &vSegs, int index, TimingSegment *cur )
{
#ifdef DEBUG
#ifdef WITH_LOGGING_TIMING_DATA
LOG->Trace( "EraseSegment(%d, %p)", index, cur );
cur->DebugPrint();
#endif
@@ -548,7 +548,7 @@ static void EraseSegment( vector<TimingSegment*> &vSegs, int index, TimingSegmen
// so we must deep-copy it (with ::Copy) for new allocations.
void TimingData::AddSegment( const TimingSegment *seg )
{
#ifdef DEBUG
#ifdef WITH_LOGGING_TIMING_DATA
LOG->Trace( "AddSegment( %s )", TimingSegmentTypeToString(seg->GetType()).c_str() );
seg->DebugPrint();
#endif
@@ -667,7 +667,7 @@ void TimingData::AddSegment( const TimingSegment *seg )
// the segment at or before this row is equal to the new one; ignore it
if( bOnSameRow && (*cur) == (*seg) )
{
#if defined(DEBUG)
#ifdef WITH_LOGGING_TIMING_DATA
LOG->Trace( "equals previous segment, ignoring" );
#endif
return;
@@ -1100,7 +1100,7 @@ float TimingData::GetDisplayedSpeedPercent( float fSongBeat, float fMusicSeconds
if( speeds.size() == 0 )
{
#ifdef DEBUG
LOG->Trace("No speed segments");
LOG->Trace("No speed segments found: using default value.");
#endif
return 1.0f;
}
+3
View File
@@ -135,6 +135,9 @@ typedef long ssize_t;
/* Defined to 1 if building on a windows system, and thus uses the windows loading window. */
#cmakedefine NEED_WINDOWS_LOADING_WINDOW 1
/* Defined to 1 if logging timing segment additions and removals. */
#cmakedefine WITH_LOGGING_TIMING_DATA 1
/* Defined to 1 if the PBS_MARQUEE symbol was found. */
#cmakedefine HAVE_PBS_MARQUEE 1