diff --git a/Projects/CodeBlocks/SleepyHead.depend b/Projects/CodeBlocks/SleepyHead.depend index 2ab3e59e..2a1a3e5f 100644 --- a/Projects/CodeBlocks/SleepyHead.depend +++ b/Projects/CodeBlocks/SleepyHead.depend @@ -8306,7 +8306,23 @@ -1308026543 /home/mark/projects/git/sleepyhead/src/version.h +1308026543 D + +1308030963 /home/mark/projects/git/sleepyhead/src/version.h + +1308003040 ent of cb2ab33... Linux wx2.8 & wx2.9 builds fixed + + + + + + + + "sleeplib/profiles.h" + "freesans.c" + "graph.h" + "freetype-gl/font-manager.h" + "freetype-gl/texture-font.h" 1307627540 /home/mark/projects/git/sleepyhead/src/libs/sleeplib/prs1_loader.h "machine.h" @@ -8344,7 +8360,7 @@ "sleeplib/profiles.h" "sleeplib/machine_loader.h" -1308010945 source:/home/mark/projects/git/sleepyhead/src/graphs/graph.cpp +1308030539 source:/home/mark/projects/git/sleepyhead/src/graphs/graph.cpp @@ -8361,6 +8377,8 @@ "freetype-gl/font-manager.h" "freetype-gl/texture-font.h" +1308010945 > + 1307623396 source:/home/mark/projects/git/sleepyhead/src/libs/sleeplib/binary_file.cpp "binary_file.h" @@ -11019,7 +11037,7 @@ "texture-atlas.h" -1308025957 source:/home/mark/projects/git/sleepyhead/src/libs/freetype-gl/texture-font.cpp +1308030624 source:/home/mark/projects/git/sleepyhead/src/libs/freetype-gl/texture-font.cpp @@ -11031,14 +11049,14 @@ "texture-glyph.h" -1308011216 source:/home/mark/projects/git/sleepyhead/src/libs/freetype-gl/vertex-buffer.cpp +1308030709 source:/home/mark/projects/git/sleepyhead/src/libs/freetype-gl/vertex-buffer.cpp "vertex-buffer.h" -1308000005 source:/home/mark/projects/git/sleepyhead/src/libs/freetype-gl/vector.cpp +1308030960 source:/home/mark/projects/git/sleepyhead/src/libs/freetype-gl/vector.cpp diff --git a/Projects/CodeBlocks/SleepyHead.layout b/Projects/CodeBlocks/SleepyHead.layout index cf6c9e83..f64d204f 100644 --- a/Projects/CodeBlocks/SleepyHead.layout +++ b/Projects/CodeBlocks/SleepyHead.layout @@ -19,7 +19,7 @@ - + @@ -29,25 +29,25 @@ - + - + - + - + @@ -94,4 +94,7 @@ + + + diff --git a/src/graphs/graph.cpp b/src/graphs/graph.cpp index c68e39da..193613c8 100644 --- a/src/graphs/graph.cpp +++ b/src/graphs/graph.cpp @@ -912,28 +912,15 @@ wxBitmap * gGraphWindow::RenderBitmap(int width,int height) #if wxCHECK_VERSION(2,9,0) display=wxGetX11Display(); fbc = GetGLXFBConfig(); - fbc=&fbc[0]; - #else display=(Display *)wxGetDisplay(); - - int FBAttribs[] = { - GLX_DRAWABLE_TYPE, GLX_PBUFFER_BIT, - GLX_RENDER_TYPE, GLX_RGBA_BIT, - GLX_DOUBLEBUFFER, True, - GLX_RED_SIZE, 8, - GLX_GREEN_SIZE, 8, - GLX_BLUE_SIZE, 8, - None - }; - fbc = glXChooseFBConfig(display, DefaultScreen(display), FBAttribs, &ret); // TODO: // have to setup a GLXFBConfig structure for wx2.8 because wx2.8 is crap. // already done this crap but deleted it.. arggghh..... - //return &wxNullBitmap; + return &wxNullBitmap; #endif - GLXPbuffer pBuffer=glXCreatePbuffer(display, *fbc, attrib ); + GLXPbuffer pBuffer=glXCreatePbuffer(display, fbc[0], attrib ); if (pBuffer == 0) { wxLogError(wxT("pBuffer not availble")); } @@ -946,7 +933,7 @@ wxBitmap * gGraphWindow::RenderBitmap(int width,int height) if (!cx && real_shared_context) cx=real_shared_context; // Only available after redraw.. :( else { // First render screws up unless we do this.. - gx=cx = glXCreateNewContext(display,*fbc,GLX_RGBA_TYPE, NULL, True); + gx=cx = glXCreateNewContext(display,fbc[0],GLX_RGBA_TYPE, NULL, True); } //real_shared_context = @@ -1716,7 +1703,7 @@ void gCandleStick::Plot(gGraphWindow & w,float scrx,float scry) if (m_direction==wxVERTICAL) { DrawText(str,start_px+barwidth+2+y,j,270.0,*wxBLACK); } else { - DrawText(str,j,start_py+(barwidth/2)-(y/2)+4); //0,*wxBLACK,texfont); + DrawText(str,j,start_py+(barwidth/2)-(y/2)+1); } } diff --git a/src/libs/freetype-gl/texture-font.cpp b/src/libs/freetype-gl/texture-font.cpp index 8ffb0a74..a2fc50ed 100644 --- a/src/libs/freetype-gl/texture-font.cpp +++ b/src/libs/freetype-gl/texture-font.cpp @@ -145,7 +145,7 @@ int TextureFont::CacheGlyphs(wchar_t * charcodes) for( x=0; xbitmap.width; ++x ) { for( y=0; ybitmap.rows; ++y ){ c = *(unsigned char *)(slot->bitmap.buffer + y*slot->bitmap.pitch + x ); - c = (unsigned char) ( pow((float)c/255.0, (float)m_gamma) * 255); + c = (unsigned char) ( pow(float(c)/255.0, (float)m_gamma) * 255); *(unsigned char *)(slot->bitmap.buffer + y*slot->bitmap.pitch + x ) = c; } } diff --git a/src/libs/freetype-gl/vector.cpp b/src/libs/freetype-gl/vector.cpp index eff3a080..706a788b 100644 --- a/src/libs/freetype-gl/vector.cpp +++ b/src/libs/freetype-gl/vector.cpp @@ -61,7 +61,8 @@ vector_get( const Vector *self, assert( self ); assert( self->size ); assert( index < self->size ); - return self->items + index * self->item_size; + //unsigned char *p=; + return (unsigned char *)self->items + index * self->item_size; } @@ -175,8 +176,7 @@ vector_set( Vector *self, assert( self ); assert( self->size ); assert( index < self->size ); - memcpy( self->items + index * self->item_size, - item, self->item_size ); + memcpy( (unsigned char *)self->items + index * self->item_size, item, self->item_size ); } @@ -195,8 +195,8 @@ vector_insert( Vector *self, } if( index < self->size ) { - memmove( self->items + (index + 1) * self->item_size, - self->items + (index + 0) * self->item_size, + memmove( (unsigned char *)self->items + (index + 1) * self->item_size, + (unsigned char *)self->items + (index + 0) * self->item_size, (self->size - index) * self->item_size); } self->size++; @@ -214,8 +214,8 @@ vector_erase_range( Vector *self, assert( first < self->size ); assert( last < self->size+1 ); assert( first < last ); - memmove( self->items + first * self->item_size, - self->items + last * self->item_size, + memmove( (unsigned char *)self->items + first * self->item_size, + (unsigned char *)self->items + last * self->item_size, (self->size - last) * self->item_size); self->size -= (last-first); } @@ -284,8 +284,7 @@ vector_push_back_data( Vector *self, { vector_reserve(self, self->size+count); } - memmove( self->items + self->size * self->item_size, data, - count*self->item_size ); + memmove( (unsigned char *)self->items + self->size * self->item_size, data, count*self->item_size ); self->size += count; } @@ -306,11 +305,9 @@ vector_insert_data( Vector *self, { vector_reserve(self, self->size+count); } - memmove( self->items + (index + count ) * self->item_size, - self->items + (index ) * self->item_size, - count*self->item_size ); - memmove( self->items + index * self->item_size, data, - count*self->item_size ); + memmove( (unsigned char *)self->items + (index + count ) * self->item_size, + (unsigned char *)self->items + (index ) * self->item_size, count*self->item_size ); + memmove( (unsigned char *)self->items + index * self->item_size, data, count*self->item_size ); self->size += count; } diff --git a/src/libs/freetype-gl/vertex-buffer.cpp b/src/libs/freetype-gl/vertex-buffer.cpp index ae019f57..34833281 100644 --- a/src/libs/freetype-gl/vertex-buffer.cpp +++ b/src/libs/freetype-gl/vertex-buffer.cpp @@ -399,15 +399,15 @@ char * GL_TYPE_STRING(GLenum gtype) { switch(gtype) { - case GL_BOOL: return "GL_BOOL"; - case GL_BYTE: return "GL_BYTE"; - case GL_UNSIGNED_BYTE: return "GL_UNSIGNED_BYTE"; - case GL_SHORT: return "GL_SHORT"; - case GL_UNSIGNED_SHORT: return "GL_UNSIGNED_SHORT"; - case GL_INT: return "GL_INT"; - case GL_UNSIGNED_INT: return "GL_UNSIGNED_INT"; - case GL_FLOAT: return "GL_FLOAT"; - case GL_DOUBLE: return "GL_DOUBLE"; - default: return "GL_VOID"; + case GL_BOOL: return (char *)"GL_BOOL"; + case GL_BYTE: return (char *)"GL_BYTE"; + case GL_UNSIGNED_BYTE: return (char *)"GL_UNSIGNED_BYTE"; + case GL_SHORT: return (char *)"GL_SHORT"; + case GL_UNSIGNED_SHORT: return (char *)"GL_UNSIGNED_SHORT"; + case GL_INT: return (char *)"GL_INT"; + case GL_UNSIGNED_INT: return (char *)"GL_UNSIGNED_INT"; + case GL_FLOAT: return (char *)"GL_FLOAT"; + case GL_DOUBLE: return (char *)"GL_DOUBLE"; + default: return (char *)"GL_VOID"; } } diff --git a/src/version.h b/src/version.h index 01715a0d..e845d7d8 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 = 5641; - static const long REVISION = 14124; + static const long BUILD = 5653; + static const long REVISION = 14197; //Miscellaneous Version Types - static const long BUILDS_COUNT = 5845; - #define RC_FILEVERSION 0,7,5641,14124 - #define RC_FILEVERSION_STRING "0, 7, 5641, 14124\0" - static const char FULLVERSION_STRING[] = "0.7.5641.14124"; + static const long BUILDS_COUNT = 5867; + #define RC_FILEVERSION 0,7,5653,14197 + #define RC_FILEVERSION_STRING "0, 7, 5653, 14197\0" + static const char FULLVERSION_STRING[] = "0.7.5653.14197"; //These values are to keep track of your versioning state, don't modify them. static const long BUILD_HISTORY = 0;