From 206297da83312f139f460a8607f89291a6f96c6b Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Fri, 17 Jun 2011 02:03:34 +1000 Subject: [PATCH] Cleaned up gLineChart debugging info --- Projects/CodeBlocks/SleepyHead.depend | 4 ++-- src/graphs/graph.cpp | 20 ++++++++++++-------- src/version.h | 12 ++++++------ 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/Projects/CodeBlocks/SleepyHead.depend b/Projects/CodeBlocks/SleepyHead.depend index 804ee21d..d21bd144 100644 --- a/Projects/CodeBlocks/SleepyHead.depend +++ b/Projects/CodeBlocks/SleepyHead.depend @@ -8309,7 +8309,7 @@ 1308026543 D -1308239244 /home/mark/projects/git/sleepyhead/src/version.h +1308240204 /home/mark/projects/git/sleepyhead/src/version.h 1308003040 ent of cb2ab33... Linux wx2.8 & wx2.9 builds fixed @@ -8362,7 +8362,7 @@ "sleeplib/profiles.h" "sleeplib/machine_loader.h" -1308238538 source:/home/mark/projects/git/sleepyhead/src/graphs/graph.cpp +1308240152 source:/home/mark/projects/git/sleepyhead/src/graphs/graph.cpp "freetype-gl/font-manager.h" "freetype-gl/texture-font.h" "graph.h" diff --git a/src/graphs/graph.cpp b/src/graphs/graph.cpp index d0878ee8..0baccb1a 100644 --- a/src/graphs/graph.cpp +++ b/src/graphs/graph.cpp @@ -2041,6 +2041,8 @@ void gLineChart::Plot(gGraphWindow & w,float scrx,float scry) bool done,first; double x0,x1,xL; + int visible_points=0; + for (int n=0;nVC();n++) { // for each segment int siz=data->np[n]; @@ -2084,7 +2086,7 @@ void gLineChart::Plot(gGraphWindow & w,float scrx,float scry) double ZQ=ZR/XR; double ZW=ZR/(width*ZQ); const int num_averages=15; // Number of samples taken from samples per pixel for better min/max values - + visible_points+=ZR*ZQ; if (accel && n>0) { sam=1; } @@ -2237,16 +2239,18 @@ void gLineChart::Plot(gGraphWindow & w,float scrx,float scry) #endif } } - wxString b; - int j=vertcnt/2; - if (accel) j/=2; - b << siz << wxT(" ") << (idx) << wxT(" ") << (siz/sam) << wxT(" ") << j; - DrawText(b,scrx-190,scry-w.GetTopMargin()-14); - } + wxString b; + int j=vertcnt/2; + if (accel) j/=2; + b << visible_points << wxT(" ") << (sam) << wxT(" ") << num_points << wxT(" ") << j; + float x,y; + GetTextExtent(b,x,y); + DrawText(b,scrx-w.GetRightMargin()-x-15,scry-w.GetTopMargin()-10); + glColor4ub(col.Red(),col.Green(),col.Blue(),255); // Crop to inside the margins. @@ -2260,6 +2264,7 @@ void gLineChart::Plot(gGraphWindow & w,float scrx,float scry) glEnable(GL_LINE_SMOOTH); glHint(GL_LINE_SMOOTH_HINT, GL_NICEST); } + glEnableClientState(GL_VERTEX_ARRAY); glVertexPointer(2, GL_SHORT, 0, vertarray); glDrawArrays(GL_LINES, 0, vertcnt>>1); @@ -2331,7 +2336,6 @@ void gLineOverlayBar::Plot(gGraphWindow & w,float scrx,float scry) int quadcnt=0; static GLshort quadarray[maxverts+8]; - float bottom=start_py+25, top=start_py+height-25; wxColor & col=color[0]; for (int n=0;nVC();n++) { diff --git a/src/version.h b/src/version.h index e3dab06c..c8e2a8c4 100644 --- a/src/version.h +++ b/src/version.h @@ -16,14 +16,14 @@ namespace AutoVersion{ //Standard Version Type static const long _MAJOR = 0; static const long _MINOR = 7; - static const long _BUILD = 6390; - static const long _REVISION = 18183; + static const long _BUILD = 6402; + static const long _REVISION = 18233; //Miscellaneous Version Types - static const long _BUILDS_COUNT = 7453; - #define _RC_FILEVERSION 0,7,6390,18183 - #define _RC_FILEVERSION_STRING "0, 7, 6390, 18183\0" - static const char _FULLVERSION_STRING[] = "0.7.6390.18183"; + static const long _BUILDS_COUNT = 7475; + #define _RC_FILEVERSION 0,7,6402,18233 + #define _RC_FILEVERSION_STRING "0, 7, 6402, 18233\0" + static const char _FULLVERSION_STRING[] = "0.7.6402.18233"; //These values are to keep track of your versioning state, don't modify them. static const long _BUILD_HISTORY = 0;