Fixed "Werror" related compilation problems on Linux and Meego.

This commit is contained in:
Xawotihs
2011-08-14 18:09:02 +00:00
parent 8f1e97f8f9
commit c188b4d104
20 changed files with 22 additions and 51 deletions

View File

@@ -572,7 +572,7 @@ private:
#if (!defined IOS) && (!defined QT_CONFIG)
void LoadJPG(TextureInfo &textureInfo, const char *filename, int mode = 0, int TextureFormat = TEXTURE_FORMAT);
int LoadPNG(TextureInfo &textureInfo, const char *filename, int mode = 0, int TextureFormat = TEXTURE_FORMAT);
#if (!defined ANDROID)
#if (!defined ANDROID) && (!defined QT_CONFIG)
void LoadGIF(TextureInfo &textureInfo, const char *filename, int mode = 0, int TextureFormat = TEXTURE_FORMAT);
int image_readgif(void * handle, TextureInfo &textureInfo, DWORD * bgcolor, InputFunc readFunc,int mode = 0, int TextureFormat = TEXTURE_FORMAT);
#endif // (ANDROID) How can we get gif support for android ?

View File

@@ -228,7 +228,7 @@ float JLBFont::GetStringWidth(const char *string) const
float len = 0.0f;
const char *p = string;
char ch;
int ch;
while (*p)
{

View File

@@ -226,6 +226,7 @@ void JMD2Model::CalculateNormal(ScePspFVector3 *normal, float *p1, float *p2, fl
void JMD2Model::CalculateNormal(float *p1, float *p2, float *p3)
#endif
{
#if defined (PSP) || ((!defined GL_ES_VERSION_2_0) && (!defined GL_VERSION_2_0))
float a[3], b[3], result[3];
float length;
@@ -251,16 +252,12 @@ void JMD2Model::CalculateNormal(float *p1, float *p2, float *p3)
normal->x = result[0]/length;
normal->y = result[1]/length;
normal->z = result[2]/length;
#else
// normalize and specify the normal
#if (!defined GL_ES_VERSION_2_0) && (!defined GL_VERSION_2_0)
#elif (!defined GL_ES_VERSION_2_0) && (!defined GL_VERSION_2_0)
glNormal3f(result[0]/length, result[1]/length, result[2]/length);
#else
// FIXME
#endif //(!defined GL_ES_VERSION_2_0) && (!defined GL_VERSION_2_0)
#endif
#endif
}

View File

@@ -102,21 +102,9 @@ void hgeDistortionMesh::SetTexture(JTexture* tex)
void hgeDistortionMesh::SetTextureRect(float x, float y, float w, float h)
{
int i,j;
float tw,th;
tx=x; ty=y; width=w; height=h;
if (quad->mTex)
{
tw=(float)quad->mTex->mTexWidth;
th=(float)quad->mTex->mTexHeight;
}
else
{
tw = w;
th = h;
}
cellw=w/(nCols-1);
cellh=h/(nRows-1);

View File

@@ -1575,9 +1575,9 @@ void JRenderer::Plot(float x, float y, PIXEL_TYPE color)
{
checkGlError();
glDisable(GL_TEXTURE_2D);
#if (!defined GL_ES_VERSION_2_0) && (!defined GL_VERSION_2_0) && (!defined GL_VERSION_ES_CM_1_1)
JColor col;
col.color = color;
#if (!defined GL_ES_VERSION_2_0) && (!defined GL_VERSION_2_0) && (!defined GL_VERSION_ES_CM_1_1)
glColor4ub(col.r, col.g, col.b, col.a);
glBegin(GL_POINTS);
glVertex2f(x, SCREEN_HEIGHT_F-y);
@@ -1595,9 +1595,9 @@ void JRenderer::PlotArray(float *x, float *y, int count, PIXEL_TYPE color)
{
checkGlError();
glDisable(GL_TEXTURE_2D);
JColor col;
col.color = color;
#if (!defined GL_ES_VERSION_2_0) && (!defined GL_VERSION_2_0) && (!defined GL_VERSION_ES_CM_1_1)
JColor col;
col.color = color;
glColor4ub(col.r, col.g, col.b, col.a);
glBegin(GL_POINTS);
for (int i=0;i<count;i++)

View File

@@ -1328,10 +1328,6 @@ const char* TiXmlAttribute::Parse( const char* p, TiXmlParsingData* data, TiXmlE
p = SkipWhiteSpace( p, encoding );
if ( !p || !*p ) return 0;
int tabsize = 4;
if ( document )
tabsize = document->TabSize();
if ( data )
{
data->Stamp( p, encoding );