Hopefully last of the current build errors

This commit is contained in:
Mark Watkins 2011-06-14 16:15:57 +10:00
parent 1cee803476
commit abd0a0cff7
7 changed files with 161 additions and 213 deletions

View File

@ -8240,7 +8240,7 @@
<wx/datectrl.h>
<wx/dateevt.h>
1307528196 source:/home/mark/projects/git/sleepyhead/src/SleepyHeadApp.cpp
1308031885 source:/home/mark/projects/git/sleepyhead/src/SleepyHeadApp.cpp
"wx_pch.h"
<iostream>
<wx/log.h>
@ -8308,7 +8308,7 @@
1308026543 D
1308030963 /home/mark/projects/git/sleepyhead/src/version.h
1308032101 /home/mark/projects/git/sleepyhead/src/version.h
1308003040 ent of cb2ab33... Linux wx2.8 & wx2.9 builds fixed
<wx/dcbuffer.h>
@ -8340,7 +8340,7 @@
"preferences.h"
"tinyxml/tinyxml.h"
1308026543 source:/home/mark/projects/git/sleepyhead/src/SleepyHeadMain.cpp
1308031975 source:/home/mark/projects/git/sleepyhead/src/SleepyHeadMain.cpp
"wx_pch.h"
"version.h"
<wx/app.h>
@ -11037,7 +11037,7 @@
<GL/glew.h>
"texture-atlas.h"
1308030624 source:/home/mark/projects/git/sleepyhead/src/libs/freetype-gl/texture-font.cpp
1308031681 source:/home/mark/projects/git/sleepyhead/src/libs/freetype-gl/texture-font.cpp
<ft2build.h>
<wx/log.h>
<math.h>
@ -11056,7 +11056,7 @@
<stdio.h>
"vertex-buffer.h"
1308030960 source:/home/mark/projects/git/sleepyhead/src/libs/freetype-gl/vector.cpp
1308031619 source:/home/mark/projects/git/sleepyhead/src/libs/freetype-gl/vector.cpp
<assert.h>
<stdlib.h>
<string.h>

View File

@ -63,7 +63,7 @@ bool SleepyHeadApp::OnInit()
//loader_progress->Show();
pref["AppName"]=wxT("Awesome Sleep Application");
pref["Version"]=wxString(AutoVersion::FULLVERSION_STRING,wxConvUTF8);
pref["Version"]=wxString(AutoVersion::_FULLVERSION_STRING,wxConvUTF8);
pref["Profile"]=wxGetUserId();
profile=Profiles::Get(pref["Profile"]);

View File

@ -78,7 +78,7 @@ SleepyHeadFrame::SleepyHeadFrame(wxFrame *frame)
{
//GraphInit(); // Don't do this here: The first gGraphWindow must do it.
wxString title=wxTheApp->GetAppName()+wxT(" v")+wxString(AutoVersion::FULLVERSION_STRING,wxConvUTF8);
wxString title=wxTheApp->GetAppName()+wxT(" v")+wxString(AutoVersion::_FULLVERSION_STRING,wxConvUTF8);
SetTitle(title);
profile=Profiles::Get();
@ -288,11 +288,11 @@ void SleepyHeadFrame::OnAntiAliasing( wxCommandEvent& event )
void SleepyHeadFrame::OnAbout(wxCommandEvent &event)
{
// wxAboutBox is fairly useless.
wxString day=wxString(AutoVersion::DATE,wxConvUTF8);
wxString month=wxString(AutoVersion::MONTH,wxConvUTF8);
wxString year=wxString(AutoVersion::YEAR,wxConvUTF8);
wxString day=wxString(AutoVersion::_DATE,wxConvUTF8);
wxString month=wxString(AutoVersion::_MONTH,wxConvUTF8);
wxString year=wxString(AutoVersion::_YEAR,wxConvUTF8);
wxString date=day+wxT("/")+month+wxT("/")+year;
wxString msg=wxTheApp->GetAppName()+wxT(" v")+wxString(AutoVersion::FULLVERSION_STRING,wxConvUTF8)+_(" alpha preview ")+date+_("\n\n")+wxT("\u00a9")+_("2011 Mark Watkins & Troy Schultz\n\n");
wxString msg=wxTheApp->GetAppName()+wxT(" v")+wxString(AutoVersion::_FULLVERSION_STRING,wxConvUTF8)+_(" alpha preview ")+date+_("\n\n")+wxT("\u00a9")+_("2011 Mark Watkins & Troy Schultz\n\n");
msg+=_("Website: http://sleepyhead.sourceforge.net\n\n");
msg+=_("License: GNU Public License (GPL)\n\n");
msg+=_("This software is under active development, and is guaranteed to break and change regularly! Use at your own risk.\n\n");

View File

@ -145,7 +145,7 @@ int TextureFont::CacheGlyphs(wchar_t * charcodes)
for( x=0; x<slot->bitmap.width; ++x ) {
for( y=0; y<slot->bitmap.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;
}
}

View File

@ -25,299 +25,247 @@
//#include <stdio.h>
#include "freetype-gl/vector.h"
Vector *
vector_new( size_t item_size )
Vector * vector_new( size_t item_size )
{
assert( item_size );
assert( item_size );
Vector *self = (Vector *) malloc( sizeof(Vector) );
if( !self )
{
return NULL;
}
self->item_size = item_size;
self->size = 0;
self->capacity = 1;
self->items = malloc( self->item_size * self->capacity );
return self;
Vector *self = (Vector *) malloc( sizeof(Vector) );
if( !self ) {
return NULL;
}
self->item_size = item_size;
self->size = 0;
self->capacity = 1;
self->items = malloc( self->item_size * self->capacity );
return self;
}
void
vector_delete( Vector *self )
void vector_delete( Vector *self )
{
assert( self );
free( self->items );
free( self );
assert( self );
free( self->items );
free( self );
}
const void *
vector_get( const Vector *self,
size_t index )
const void * vector_get( const Vector *self, size_t index )
{
assert( self );
assert( self->size );
assert( index < self->size );
//unsigned char *p=;
return (unsigned char *)self->items + index * self->item_size;
assert( self );
assert( self->size );
assert( index < self->size );
//unsigned char *p=;
return (unsigned char *)self->items + index * self->item_size;
}
const void *
vector_front( const Vector *self )
const void * vector_front( const Vector *self )
{
assert( self );
assert( self->size );
return vector_get( self, 0 );
assert( self );
assert( self->size );
return vector_get( self, 0 );
}
const void *
vector_back( const Vector *self )
const void * vector_back( const Vector *self )
{
assert( self );
assert( self->size );
return vector_get( self, self->size-1 );
assert( self );
assert( self->size );
return vector_get( self, self->size-1 );
}
int
vector_contains( const Vector *self,
const void *item,
int (*cmp)(const void *, const void *) )
int vector_contains( const Vector *self, const void *item, int (*cmp)(const void *, const void *) )
{
size_t i;
assert( self );
for( i=0; i<self->size; ++i )
{
if( (*cmp)(item, vector_get(self,i) ) == 0 )
{
return 1;
}
}
return 0;
size_t i;
assert( self );
for( i=0; i<self->size; ++i ) {
if( (*cmp)(item, vector_get(self,i) ) == 0 ) {
return 1;
}
}
return 0;
}
int
vector_empty( const Vector *self )
int vector_empty( const Vector *self )
{
assert( self );
return self->size == 0;
assert( self );
return self->size == 0;
}
size_t
vector_size( const Vector *self )
size_t vector_size( const Vector *self )
{
assert( self );
return self->size;
assert( self );
return self->size;
}
void
vector_reserve( Vector *self,
const size_t size )
void vector_reserve( Vector *self, const size_t size )
{
assert( self );
if( self->capacity < size);
{
self->items = realloc( self->items, size * self->item_size );
self->capacity = size;
}
assert( self );
if( self->capacity < size);
{
self->items = realloc( self->items, size * self->item_size );
self->capacity = size;
}
}
size_t
vector_capacity( const Vector *self )
size_t vector_capacity( const Vector *self )
{
assert( self );
return self->capacity;
assert( self );
return self->capacity;
}
void
vector_shrink( Vector *self )
void vector_shrink( Vector *self )
{
assert( self );
if( self->capacity > self->size )
{
self->items = realloc( self->items, self->size * self->item_size );
}
self->capacity = self->size;
assert( self );
if( self->capacity > self->size ) {
self->items = realloc( self->items, self->size * self->item_size );
}
self->capacity = self->size;
}
void
vector_clear( Vector *self )
void vector_clear( Vector *self )
{
assert( self );
self->size = 0;
assert( self );
self->size = 0;
}
void
vector_set( Vector *self,
const size_t index,
const void *item )
void vector_set( Vector *self, const size_t index, const void *item )
{
assert( self );
assert( self->size );
assert( index < self->size );
memcpy( (unsigned char *)self->items + index * self->item_size, item, self->item_size );
assert( self );
assert( self->size );
assert( index < self->size );
memcpy( (unsigned char *)self->items + index * self->item_size, item, self->item_size );
}
void
vector_insert( Vector *self,
const size_t index,
const void *item )
void vector_insert( Vector *self, const size_t index, const void *item )
{
assert( self );
assert( index <= self->size);
assert( self );
assert( index <= self->size);
if( self->capacity <= self->size )
{
vector_reserve(self, 2 * self->capacity );
}
if( index < self->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++;
vector_set( self, index, item );
if( self->capacity <= self->size ) {
vector_reserve(self, 2 * self->capacity );
}
if( index < self->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++;
vector_set( self, index, item );
}
void
vector_erase_range( Vector *self,
const size_t first,
const size_t last )
void vector_erase_range( Vector *self, const size_t first, const size_t last )
{
assert( self );
assert( first < self->size );
assert( last < self->size+1 );
assert( first < last );
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);
assert( self );
assert( first < self->size );
assert( last < self->size+1 );
assert( first < last );
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);
}
void
vector_erase( Vector *self,
const size_t index )
void vector_erase( Vector *self, const size_t index )
{
assert( self );
assert( index < self->size );
assert( self );
assert( index < self->size );
vector_erase_range( self, index, index+1 );
vector_erase_range( self, index, index+1 );
}
void
vector_push_back( Vector *self,
const void *item )
void vector_push_back( Vector *self, const void *item )
{
vector_insert( self, self->size, item );
vector_insert( self, self->size, item );
}
void
vector_pop_back( Vector *self )
void vector_pop_back( Vector *self )
{
assert( self );
assert( self->size );
self->size--;
assert( self );
assert( self->size );
self->size--;
}
void
vector_resize( Vector *self,
const size_t size )
void vector_resize( Vector *self, const size_t size )
{
assert( self );
if( size > self->capacity)
{
vector_reserve( self, size );
self->size = self->capacity;
}
else
{
self->size = size;
}
assert( self );
if( size > self->capacity) {
vector_reserve( self, size );
self->size = self->capacity;
} else {
self->size = size;
}
}
void
vector_push_back_data( Vector *self,
const void * data,
const size_t count )
void vector_push_back_data( Vector *self, const void * data, const size_t count )
{
assert( self );
assert( data );
assert( count );
assert( self );
assert( data );
assert( count );
if( self->capacity < (self->size+count) )
{
vector_reserve(self, self->size+count);
}
memmove( (unsigned char *)self->items + self->size * self->item_size, data, count*self->item_size );
self->size += count;
if (self->capacity < (self->size+count)) {
vector_reserve(self, self->size+count);
}
memmove( (unsigned char *)self->items + self->size * self->item_size, data, count*self->item_size );
self->size += count;
}
void
vector_insert_data( Vector *self,
const size_t index,
const void * data,
const size_t count )
void vector_insert_data(Vector *self, const size_t index, const void * data, const size_t count)
{
assert( self );
assert( index < self->size );
assert( data );
assert( count );
assert( self );
assert( index < self->size );
assert( data );
assert( count );
if( self->capacity < (self->size+count) )
{
vector_reserve(self, self->size+count);
}
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;
if (self->capacity < (self->size+count)) {
vector_reserve(self, self->size+count);
}
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;
}
void
vector_sort( Vector *self,
int (*cmp)(const void *, const void *) )
void vector_sort(Vector *self, int (*cmp)(const void *, const void *))
{
assert( self );
assert( self->size );
qsort(self->items, self->size, self->item_size, cmp);
assert( self );
assert( self->size );
qsort(self->items, self->size, self->item_size, cmp);
}

View File

@ -52,7 +52,7 @@ void VertexBuffer::__init(char *_format)
p = (char *)(strchr(p, ':'));
attribute->m_pointer = pointer;
stride += attribute->m_size*GL_TYPE_SIZE(attribute->m_type);
pointer+= attribute->m_size*GL_TYPE_SIZE(attribute->m_type);
pointer=(unsigned char *)pointer+ attribute->m_size*GL_TYPE_SIZE(attribute->m_type);
attributes[index] = attribute;
index++;
}

View File

@ -4,29 +4,29 @@
namespace AutoVersion{
//Date Version Types
static const char DATE[] = "14";
static const char MONTH[] = "06";
static const char YEAR[] = "2011";
static const char UBUNTU_VERSION_STYLE[] = "11.06";
static const char _DATE[] = "14";
static const char _MONTH[] = "06";
static const char _YEAR[] = "2011";
static const char _UBUNTU_VERSION_STYLE[] = "11.06";
//Software Status
static const char STATUS[] = "Alpha";
static const char STATUS_SHORT[] = "a";
static const char _STATUS[] = "Alpha";
static const char _STATUS_SHORT[] = "a";
//Standard Version Type
static const long MAJOR = 0;
static const long MINOR = 7;
static const long BUILD = 5653;
static const long REVISION = 14197;
static const long _MAJOR = 0;
static const long _MINOR = 7;
static const long _BUILD = 5659;
static const long _REVISION = 14237;
//Miscellaneous Version Types
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";
static const long _BUILDS_COUNT = 5892;
#define _RC_FILEVERSION 0,7,5659,14237
#define _RC_FILEVERSION_STRING "0, 7, 5659, 14237\0"
static const char _FULLVERSION_STRING[] = "0.7.5659.14237";
//These values are to keep track of your versioning state, don't modify them.
static const long BUILD_HISTORY = 0;
static const long _BUILD_HISTORY = 0;
}