diff --git a/src/BitmapUtils.cpp b/src/BitmapUtils.cpp index cf3ddcce7..b83187421 100644 --- a/src/BitmapUtils.cpp +++ b/src/BitmapUtils.cpp @@ -34,12 +34,12 @@ inline void BMP_EndianFlipInt(int * x) { int t = Endian32_Swap(*x); *x = t; } inline void BMP_EndianFlipShort(short * x) { short t = Endian16_Swap(*x); *x = t; } #else -#define BMP_EndianFlipInt(x) (x) -#define BMP_EndianFlipShort(x) (x) +#define BMP_EndianFlipInt(x) +#define BMP_EndianFlipShort(x) #endif #else - #define BMP_EndianFlipInt(x) (x) - #define BMP_EndianFlipShort(x) (x) + #define BMP_EndianFlipInt(x) + #define BMP_EndianFlipShort(x) #endif #if BITMAP_USE_JPEG diff --git a/src/XOGLUtils.cpp b/src/XOGLUtils.cpp index 99e6d0e43..0466358e7 100644 --- a/src/XOGLUtils.cpp +++ b/src/XOGLUtils.cpp @@ -151,6 +151,7 @@ bool OGL_UtilsInit() firstTime = false; } +#if IBM // Make sure everything got initialized if(glBindBufferARB && glActiveTextureARB && @@ -162,5 +163,8 @@ bool OGL_UtilsInit() } else return false; +#else + return true; +#endif } diff --git a/src/XObjReadWrite.cpp b/src/XObjReadWrite.cpp index b35ef6ddb..344c63176 100644 --- a/src/XObjReadWrite.cpp +++ b/src/XObjReadWrite.cpp @@ -48,8 +48,8 @@ bool XObjRead(const char * inFile, XObj& outObj) vec_tex vst; vec_rgb vrgb; - float scanned_st_rgb[4][3]={0,0,0 , 0,0,0,// [corner][color or st] - 0,0,0 , 0,0,0}; + float scanned_st_rgb[4][3]={{0,0,0} , {0,0,0},// [corner][color or st] + {0,0,0} , {0,0,0}}; outObj.cmds.clear(); diff --git a/src/XPMPMultiplayerCSL.cpp b/src/XPMPMultiplayerCSL.cpp index 988ffa994..c8b5ec3b2 100644 --- a/src/XPMPMultiplayerCSL.cpp +++ b/src/XPMPMultiplayerCSL.cpp @@ -182,6 +182,7 @@ char * fgets_multiplatform(char * s, int n, FILE * file) // Only bother to read if we have enough space in the char buf. if (n) + { do { c = getc(file); @@ -204,19 +205,20 @@ char * fgets_multiplatform(char * s, int n, FILE * file) // Note that the \r\n IS written to the line. while (c != '\n' && c != '\r' && --n); - // Ben's special code: eat a \n if it follows a \r, etc. Mac stdio - // swizzles these guys a bit, so we will consolidate BOTH \r\n and \n\r into - // just the first. - if (c == '\r') - { - c1 = getc(file); - if (c1 != '\n') ungetc(c1, file); - } - if (c == '\n') - { - c1 = getc(file); - if (c1 != '\r') ungetc(c1, file); - } + // Ben's special code: eat a \n if it follows a \r, etc. Mac stdio + // swizzles these guys a bit, so we will consolidate BOTH \r\n and \n\r into + // just the first. + if (c == '\r') + { + c1 = getc(file); + if (c1 != '\n') ungetc(c1, file); + } + if (c == '\n') + { + c1 = getc(file); + if (c1 != '\r') ungetc(c1, file); + } + } // Unless we're bailing with NULL, we MUST null terminate. *p = 0; diff --git a/src/XPMPMultiplayerObj.cpp b/src/XPMPMultiplayerObj.cpp index 3238ab5f7..ab9db3728 100644 --- a/src/XPMPMultiplayerObj.cpp +++ b/src/XPMPMultiplayerObj.cpp @@ -551,7 +551,9 @@ void OBJ_PlotModel(int model, int texID, int litTexID, float inDistance, double GLint xpBuffer; // See if the card even has VBO. If it does, save xplane's pointer // and bind to 0 for us. +#if IBM if(glBindBufferARB) +#endif { glGetIntegerv(GL_ARRAY_BUFFER_BINDING_ARB, &xpBuffer); glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0); @@ -595,7 +597,9 @@ void OBJ_PlotModel(int model, int texID, int litTexID, float inDistance, double glPopClientAttrib(); // If we bound before, we need to put xplane back where it was +#if IBM if(glBindBufferARB) +#endif glBindBufferARB(GL_ARRAY_BUFFER_ARB, xpBuffer); sObjects[model].lods[lodIdx].triangleList.clear();