Resolved merge conflict

This commit is contained in:
Wade Williams
2013-11-20 11:12:51 -06:00
6 changed files with 121 additions and 119 deletions

View File

@@ -410,11 +410,11 @@ typedef void (* XPMPPlaneNotifier_f)(
* *
* This function fetches specific data about a plane in the sim. Pass in a plane ID, a data type * This function fetches specific data about a plane in the sim. Pass in a plane ID, a data type
* and a pointer to a struct for the data. The struct's size field must be filled in! The data * and a pointer to a struct for the data. The struct's size field must be filled in! The data
* will be returned if possible, as well as the sim cycle the data is from, or 0 if the data could not * will be returned if possible, as well as an enum code indicating whether we are returning new
* be fetched. * data, old data, or we have no data at all.
* *
*/ */
int XPMPGetPlaneData( XPMPPlaneCallbackResult XPMPGetPlaneData(
XPMPPlaneID inPlane, XPMPPlaneID inPlane,
XPMPPlaneDataType inDataType, XPMPPlaneDataType inDataType,
void * outData); void * outData);

View File

@@ -31,14 +31,14 @@
#if APL #if APL
#include <Carbon/Carbon.h> #include <Carbon/Carbon.h>
#if defined(__POWERPC__) #if defined(__POWERPC__)
inline void BMP_EndianFlipLong(long * x) { long t = Endian32_Swap(*x); *x = t; } 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; } inline void BMP_EndianFlipShort(short * x) { short t = Endian16_Swap(*x); *x = t; }
#else #else
#define BMP_EndianFlipLong(x) (x) #define BMP_EndianFlipInt(x) (x)
#define BMP_EndianFlipShort(x) (x) #define BMP_EndianFlipShort(x) (x)
#endif #endif
#else #else
#define BMP_EndianFlipLong(x) (x) #define BMP_EndianFlipInt(x) (x)
#define BMP_EndianFlipShort(x) (x) #define BMP_EndianFlipShort(x) (x)
#endif #endif
@@ -75,7 +75,7 @@ int CreateBitmapFromFile(const char * inFilePath, struct ImageInfo * outImageIn
{ {
struct BMPHeader header; struct BMPHeader header;
struct BMPImageDesc imageDesc; struct BMPImageDesc imageDesc;
long pad; int pad;
int err = 0; int err = 0;
FILE * fi = NULL; FILE * fi = NULL;
@@ -93,11 +93,11 @@ int CreateBitmapFromFile(const char * inFilePath, struct ImageInfo * outImageIn
if (fread(&imageDesc, sizeof(imageDesc), 1, fi) != 1) if (fread(&imageDesc, sizeof(imageDesc), 1, fi) != 1)
goto bail; goto bail;
BMP_EndianFlipLong(&header.fileSize); BMP_EndianFlipInt(&header.fileSize);
BMP_EndianFlipLong(&header.dataOffset); BMP_EndianFlipInt(&header.dataOffset);
BMP_EndianFlipLong(&imageDesc.imageWidth); BMP_EndianFlipInt(&imageDesc.imageWidth);
BMP_EndianFlipLong(&imageDesc.imageHeight); BMP_EndianFlipInt(&imageDesc.imageHeight);
BMP_EndianFlipShort(&imageDesc.bitCount); BMP_EndianFlipShort(&imageDesc.bitCount);
if ((header.signature1 != 'B') || if ((header.signature1 != 'B') ||
@@ -158,9 +158,9 @@ int WriteBitmapToFile(const struct ImageInfo * inImage, const char * inFilePath
header.fileSize = sizeof(struct BMPHeader) + sizeof(struct BMPImageDesc) + ((inImage->width * 3 + inImage->pad) * inImage->height); header.fileSize = sizeof(struct BMPHeader) + sizeof(struct BMPImageDesc) + ((inImage->width * 3 + inImage->pad) * inImage->height);
header.reserved = 0; header.reserved = 0;
header.dataOffset = sizeof(struct BMPHeader) + sizeof(struct BMPImageDesc); header.dataOffset = sizeof(struct BMPHeader) + sizeof(struct BMPImageDesc);
BMP_EndianFlipLong(&header.fileSize); BMP_EndianFlipInt(&header.fileSize);
BMP_EndianFlipLong(&header.reserved); BMP_EndianFlipInt(&header.reserved);
BMP_EndianFlipLong(&header.dataOffset); BMP_EndianFlipInt(&header.dataOffset);
imageDesc.structSize = sizeof(imageDesc); imageDesc.structSize = sizeof(imageDesc);
imageDesc.imageWidth = inImage->width; imageDesc.imageWidth = inImage->width;
@@ -174,17 +174,17 @@ int WriteBitmapToFile(const struct ImageInfo * inImage, const char * inFilePath
imageDesc.colorsUsed = 0; imageDesc.colorsUsed = 0;
imageDesc.colorsImportant = 0; imageDesc.colorsImportant = 0;
BMP_EndianFlipLong(&imageDesc.structSize); BMP_EndianFlipInt(&imageDesc.structSize);
BMP_EndianFlipLong(&imageDesc.imageWidth); BMP_EndianFlipInt(&imageDesc.imageWidth);
BMP_EndianFlipLong(&imageDesc.imageHeight); BMP_EndianFlipInt(&imageDesc.imageHeight);
BMP_EndianFlipShort(&imageDesc.planes); BMP_EndianFlipShort(&imageDesc.planes);
BMP_EndianFlipShort(&imageDesc.bitCount); BMP_EndianFlipShort(&imageDesc.bitCount);
BMP_EndianFlipLong(&imageDesc.compressionType); BMP_EndianFlipInt(&imageDesc.compressionType);
BMP_EndianFlipLong(&imageDesc.imageSize); BMP_EndianFlipInt(&imageDesc.imageSize);
BMP_EndianFlipLong(&imageDesc.xPixelsPerM); BMP_EndianFlipInt(&imageDesc.xPixelsPerM);
BMP_EndianFlipLong(&imageDesc.yPixelsPerM); BMP_EndianFlipInt(&imageDesc.yPixelsPerM);
BMP_EndianFlipLong(&imageDesc.colorsUsed); BMP_EndianFlipInt(&imageDesc.colorsUsed);
BMP_EndianFlipLong(&imageDesc.colorsImportant); BMP_EndianFlipInt(&imageDesc.colorsImportant);
fi = fopen(inFilePath, "wb"); fi = fopen(inFilePath, "wb");
if (fi == NULL) if (fi == NULL)
@@ -211,7 +211,7 @@ bail:
return err; return err;
} }
int CreateNewBitmap(long inWidth, long inHeight, short inChannels, struct ImageInfo * outImageInfo) int CreateNewBitmap(int inWidth, int inHeight, int inChannels, struct ImageInfo * outImageInfo)
{ {
outImageInfo->width = inWidth; outImageInfo->width = inWidth;
outImageInfo->height = inHeight; outImageInfo->height = inHeight;
@@ -238,14 +238,14 @@ void DestroyBitmap(const struct ImageInfo * inImageInfo)
void CopyBitmapSection( void CopyBitmapSection(
const struct ImageInfo * inSrc, const struct ImageInfo * inSrc,
const struct ImageInfo * inDst, const struct ImageInfo * inDst,
long inSrcLeft, int inSrcLeft,
long inSrcTop, int inSrcTop,
long inSrcRight, int inSrcRight,
long inSrcBottom, int inSrcBottom,
long inDstLeft, int inDstLeft,
long inDstTop, int inDstTop,
long inDstRight, int inDstRight,
long inDstBottom) int inDstBottom)
{ {
/* This routine copies a subsection of one bitmap onto a subsection of another, using bicubic interpolation /* This routine copies a subsection of one bitmap onto a subsection of another, using bicubic interpolation
for scaling. */ for scaling. */
@@ -271,9 +271,9 @@ void CopyBitmapSection(
double dx, dy; double dx, dy;
long srcRowBytes = inSrc->width * inSrc->channels + inSrc->pad; int srcRowBytes = inSrc->width * inSrc->channels + inSrc->pad;
long srcRowBytes2 = srcRowBytes * 2; int srcRowBytes2 = srcRowBytes * 2;
long dstRowBytes = inDst->width * inSrc->channels + inDst->pad; int dstRowBytes = inDst->width * inSrc->channels + inDst->pad;
unsigned char * srcBaseAddr = inSrc->data; unsigned char * srcBaseAddr = inSrc->data;
unsigned char * dstBaseAddr = inDst->data; unsigned char * dstBaseAddr = inDst->data;
@@ -289,8 +289,8 @@ void CopyBitmapSection(
double sx = ((dx - dstLeft) / dstWidth * srcWidth) + srcLeft; double sx = ((dx - dstLeft) / dstWidth * srcWidth) + srcLeft;
double sy = ((dy - dstTop) / dstHeight * srcHeight) + srcTop; double sy = ((dy - dstTop) / dstHeight * srcHeight) + srcTop;
unsigned char * dstPixel = dstBaseAddr + ((long) dx * inDst->channels) + ((long) dy * dstRowBytes); unsigned char * dstPixel = dstBaseAddr + ((int) dx * inDst->channels) + ((int) dy * dstRowBytes);
unsigned char * srcPixel = srcBaseAddr + ((long) sx * inSrc->channels) + ((long) sy * srcRowBytes); unsigned char * srcPixel = srcBaseAddr + ((int) sx * inSrc->channels) + ((int) sy * srcRowBytes);
/* If we would need pixels from off the edge of the image for bicubic interpolation, /* If we would need pixels from off the edge of the image for bicubic interpolation,
just use bilinear. */ just use bilinear. */
@@ -355,18 +355,18 @@ inline double Interp2(double frac, double sml, double big)
void CopyBitmapSectionWarped( void CopyBitmapSectionWarped(
const struct ImageInfo * inSrc, const struct ImageInfo * inSrc,
const struct ImageInfo * inDst, const struct ImageInfo * inDst,
long inTopLeftX, int inTopLeftX,
long inTopLeftY, int inTopLeftY,
long inTopRightX, int inTopRightX,
long inTopRightY, int inTopRightY,
long inBotRightX, int inBotRightX,
long inBotRightY, int inBotRightY,
long inBotLeftX, int inBotLeftX,
long inBotLeftY, int inBotLeftY,
long inDstLeft, int inDstLeft,
long inDstTop, int inDstTop,
long inDstRight, int inDstRight,
long inDstBottom) int inDstBottom)
{ {
/* This routine copies a subsection of one bitmap onto a subsection of another, using bicubic interpolation /* This routine copies a subsection of one bitmap onto a subsection of another, using bicubic interpolation
for scaling. */ for scaling. */
@@ -391,9 +391,9 @@ void CopyBitmapSectionWarped(
double dx, dy; double dx, dy;
long srcRowBytes = inSrc->width * inSrc->channels + inSrc->pad; int srcRowBytes = inSrc->width * inSrc->channels + inSrc->pad;
long srcRowBytes2 = srcRowBytes * 2; int srcRowBytes2 = srcRowBytes * 2;
long dstRowBytes = inDst->width * inSrc->channels + inDst->pad; int dstRowBytes = inDst->width * inSrc->channels + inDst->pad;
unsigned char * srcBaseAddr = inSrc->data; unsigned char * srcBaseAddr = inSrc->data;
unsigned char * dstBaseAddr = inDst->data; unsigned char * dstBaseAddr = inDst->data;
@@ -412,8 +412,8 @@ void CopyBitmapSectionWarped(
double sx = Interp2(frac_y, Interp2(frac_x, topLeftX, topRightX), Interp2(frac_x, botLeftX, botRightX)); double sx = Interp2(frac_y, Interp2(frac_x, topLeftX, topRightX), Interp2(frac_x, botLeftX, botRightX));
double sy = Interp2(frac_x, Interp2(frac_y, topLeftY, botLeftY), Interp2(frac_y, topRightY, botRightY)); double sy = Interp2(frac_x, Interp2(frac_y, topLeftY, botLeftY), Interp2(frac_y, topRightY, botRightY));
unsigned char * dstPixel = dstBaseAddr + ((long) dx * inDst->channels) + ((long) dy * dstRowBytes); unsigned char * dstPixel = dstBaseAddr + ((int) dx * inDst->channels) + ((int) dy * dstRowBytes);
unsigned char * srcPixel = srcBaseAddr + ((long) sx * inSrc->channels) + ((long) sy * srcRowBytes); unsigned char * srcPixel = srcBaseAddr + ((int) sx * inSrc->channels) + ((int) sy * srcRowBytes);
/* If we would need pixels from off the edge of the image for bicubic interpolation, /* If we would need pixels from off the edge of the image for bicubic interpolation,
just use bilinear. */ just use bilinear. */
@@ -476,22 +476,22 @@ void RotateBitmapCCW(
/* We have to allocate a new bitmap to transfer our old data to. The new bitmap might not have the same /* We have to allocate a new bitmap to transfer our old data to. The new bitmap might not have the same
* storage size as the old bitmap because of padding! */ * storage size as the old bitmap because of padding! */
long newWidth = ioBitmap->height; int newWidth = ioBitmap->height;
long newHeight = ioBitmap->width; int newHeight = ioBitmap->width;
long newPad = ((newWidth * ioBitmap->channels + 3) & ~3) - (newWidth * ioBitmap->channels); int newPad = ((newWidth * ioBitmap->channels + 3) & ~3) - (newWidth * ioBitmap->channels);
unsigned char * newData = (unsigned char *) malloc(((newWidth * ioBitmap->channels) + newPad) * newHeight); unsigned char * newData = (unsigned char *) malloc(((newWidth * ioBitmap->channels) + newPad) * newHeight);
if (newData == NULL) if (newData == NULL)
return; return;
for (long y = 0; y < ioBitmap->height; ++y) for (int y = 0; y < ioBitmap->height; ++y)
for (long x = 0; x < ioBitmap->width; ++x) for (int x = 0; x < ioBitmap->width; ++x)
{ {
long nx = ioBitmap->height - y - 1; int nx = ioBitmap->height - y - 1;
long ny = x; int ny = x;
unsigned char * srcP = ioBitmap->data + (x * ioBitmap->channels) + (y * (ioBitmap->channels * ioBitmap->width + ioBitmap->pad)); unsigned char * srcP = ioBitmap->data + (x * ioBitmap->channels) + (y * (ioBitmap->channels * ioBitmap->width + ioBitmap->pad));
unsigned char * dstP = newData + (nx * ioBitmap->channels) + (ny * (ioBitmap->channels * newWidth + newPad)); unsigned char * dstP = newData + (nx * ioBitmap->channels) + (ny * (ioBitmap->channels * newWidth + newPad));
long chCount = ioBitmap->channels; int chCount = ioBitmap->channels;
while (chCount--) while (chCount--)
{ {
*dstP++ = *srcP++; *dstP++ = *srcP++;
@@ -510,8 +510,8 @@ int ConvertBitmapToAlpha(
struct ImageInfo * ioImage) struct ImageInfo * ioImage)
{ {
unsigned char * oldData, * newData, * srcPixel, * dstPixel; unsigned char * oldData, * newData, * srcPixel, * dstPixel;
long count; int count;
long x,y; int x,y;
if (ioImage->channels == 4) if (ioImage->channels == 4)
return 0; return 0;
@@ -567,8 +567,8 @@ int ConvertAlphaToBitmap(
struct ImageInfo * ioImage) struct ImageInfo * ioImage)
{ {
unsigned char * oldData, * newData, * srcPixel, * dstPixel; unsigned char * oldData, * newData, * srcPixel, * dstPixel;
long count; int count;
long x,y; int x,y;
if (ioImage->channels == 3) if (ioImage->channels == 3)
return 0; return 0;

View File

@@ -34,7 +34,7 @@
*/ */
#if APL #if APL
//#pragma options align=mac68k #pragma pack(push, 2)
#endif #endif
#if IBM #if IBM
#pragma pack(push, 2) #pragma pack(push, 2)
@@ -43,27 +43,27 @@
struct BMPHeader { struct BMPHeader {
char signature1; char signature1;
char signature2; char signature2;
long fileSize; int fileSize;
long reserved; int reserved;
long dataOffset; int dataOffset;
}; };
struct BMPImageDesc { struct BMPImageDesc {
long structSize; int structSize;
long imageWidth; int imageWidth;
long imageHeight; int imageHeight;
short planes; short planes;
short bitCount; short bitCount;
long compressionType; int compressionType;
long imageSize; int imageSize;
long xPixelsPerM; //130B0000? B013 = 45075? int xPixelsPerM; //130B0000? B013 = 45075?
long yPixelsPerM; int yPixelsPerM;
long colorsUsed; int colorsUsed;
long colorsImportant; int colorsImportant;
}; };
#if APL #if APL
#pragma options align=reset #pragma pack(pop)
#endif #endif
#if IBM #if IBM
#pragma pack(pop) #pragma pack(pop)
@@ -82,10 +82,10 @@ struct BMPImageDesc {
struct ImageInfo { struct ImageInfo {
unsigned char * data; unsigned char * data;
long width; int width;
long height; int height;
long pad; int pad;
short channels; int channels;
}; };
/* Given a file path and an uninitialized imageInfo structure, this routine fills /* Given a file path and an uninitialized imageInfo structure, this routine fills
@@ -110,7 +110,7 @@ int WriteBitmapToFile(const struct ImageInfo * inImage, const char * inFilePath
/* This routine creates a new bitmap and fills in an uninitialized imageInfo structure. /* This routine creates a new bitmap and fills in an uninitialized imageInfo structure.
* The contents of the bitmap are undetermined and must be 'cleared' by you. */ * The contents of the bitmap are undetermined and must be 'cleared' by you. */
int CreateNewBitmap(long inWidth, long inHeight, short inChannels, struct ImageInfo * outImageInfo); int CreateNewBitmap(int inWidth, int inHeight, int inChannels, struct ImageInfo * outImageInfo);
/* Given a bitmap, this routine fills the whole bitmap in with a gray level of c, where /* Given a bitmap, this routine fills the whole bitmap in with a gray level of c, where
* c = 0 means black and c = 255 means white. */ * c = 0 means black and c = 255 means white. */
@@ -127,30 +127,30 @@ void DestroyBitmap(const struct ImageInfo * inImageInfo);
void CopyBitmapSection( void CopyBitmapSection(
const struct ImageInfo * inSrc, const struct ImageInfo * inSrc,
const struct ImageInfo * inDst, const struct ImageInfo * inDst,
long inSrcLeft, int inSrcLeft,
long inSrcTop, int inSrcTop,
long inSrcRight, int inSrcRight,
long inSrcBottom, int inSrcBottom,
long inDstLeft, int inDstLeft,
long inDstTop, int inDstTop,
long inDstRight, int inDstRight,
long inDstBottom); int inDstBottom);
void CopyBitmapSectionWarped( void CopyBitmapSectionWarped(
const struct ImageInfo * inSrc, const struct ImageInfo * inSrc,
const struct ImageInfo * inDst, const struct ImageInfo * inDst,
long inTopLeftX, int inTopLeftX,
long inTopLeftY, int inTopLeftY,
long inTopRightX, int inTopRightX,
long inTopRightY, int inTopRightY,
long inBotRightX, int inBotRightX,
long inBotRightY, int inBotRightY,
long inBotLeftX, int inBotLeftX,
long inBotLeftY, int inBotLeftY,
long inDstLeft, int inDstLeft,
long inDstTop, int inDstTop,
long inDstRight, int inDstRight,
long inDstBottom); int inDstBottom);
/* This routine rotates a bitmap counterclockwise 90 degrees, exchanging its width /* This routine rotates a bitmap counterclockwise 90 degrees, exchanging its width
* and height. */ * and height. */

View File

@@ -360,7 +360,7 @@ bool XObjWrite(const char * inFile, const XObj& inObj)
case type_PtLine: case type_PtLine:
if (gCmds[index].elem_count == 0) if (gCmds[index].elem_count == 0)
fprintf(fi,"%s %d\t\t//" CRLF, gCmds[index].name, iter->rgb.size()); fprintf(fi,"%s %zd\t\t//" CRLF, gCmds[index].name, iter->rgb.size());
else else
fprintf(fi,"%s\t\t//" CRLF, gCmds[index].name); fprintf(fi,"%s\t\t//" CRLF, gCmds[index].name);
@@ -378,7 +378,7 @@ bool XObjWrite(const char * inFile, const XObj& inObj)
case type_Poly: case type_Poly:
if (gCmds[index].elem_count == 0) if (gCmds[index].elem_count == 0)
fprintf(fi,"%s %d\t\t//" CRLF, gCmds[index].name, iter->st.size()); fprintf(fi,"%s %zd\t\t//" CRLF, gCmds[index].name, iter->st.size());
else else
fprintf(fi,"%s\t\t//" CRLF, gCmds[index].name); fprintf(fi,"%s\t\t//" CRLF, gCmds[index].name);

View File

@@ -371,14 +371,17 @@ void XPMPUnregisterPlaneNotifierFunc(
gObservers.erase(iter); gObservers.erase(iter);
} }
int XPMPGetPlaneData( XPMPPlaneCallbackResult XPMPGetPlaneData(
XPMPPlaneID inPlane, XPMPPlaneID inPlane,
XPMPPlaneDataType inDataType, XPMPPlaneDataType inDataType,
void * outData) void * outData)
{ {
XPMPPlanePtr plane = XPMPPlaneIsValid(inPlane, NULL); XPMPPlanePtr plane = XPMPPlaneIsValid(inPlane, NULL);
XPMPPlaneCallbackResult result = xpmpData_Unavailable;
if (plane == NULL) if (plane == NULL)
return -1; return result;
int now = XPLMGetCycleNumber(); int now = XPLMGetCycleNumber();
@@ -387,8 +390,7 @@ int XPMPGetPlaneData(
{ {
if (plane->posAge != now) if (plane->posAge != now)
{ {
XPMPPlaneCallbackResult result = result = plane->dataFunc(plane, inDataType, &plane->pos, plane->ref);
plane->dataFunc(plane, inDataType, &plane->pos, plane->ref);
if (result == xpmpData_NewData) if (result == xpmpData_NewData)
plane->posAge = now; plane->posAge = now;
} }
@@ -396,38 +398,36 @@ int XPMPGetPlaneData(
XPMPPlanePosition_t * posD = (XPMPPlanePosition_t *) outData; XPMPPlanePosition_t * posD = (XPMPPlanePosition_t *) outData;
memcpy(posD, &plane->pos, XPMP_TMIN(posD->size, plane->pos.size)); memcpy(posD, &plane->pos, XPMP_TMIN(posD->size, plane->pos.size));
return plane->posAge; break;
} }
case xpmpDataType_Surfaces: case xpmpDataType_Surfaces:
{ {
if (plane->surfaceAge != now) if (plane->surfaceAge != now)
{ {
XPMPPlaneCallbackResult result = result = plane->dataFunc(plane, inDataType, &plane->surface, plane->ref);
plane->dataFunc(plane, inDataType, &plane->surface, plane->ref);
if (result == xpmpData_NewData) if (result == xpmpData_NewData)
plane->surfaceAge = now; plane->surfaceAge = now;
} }
XPMPPlaneSurfaces_t * surfD = (XPMPPlaneSurfaces_t *) outData; XPMPPlaneSurfaces_t * surfD = (XPMPPlaneSurfaces_t *) outData;
memcpy(surfD, &plane->surface, XPMP_TMIN(surfD->size, plane->surface.size)); memcpy(surfD, &plane->surface, XPMP_TMIN(surfD->size, plane->surface.size));
return plane->surfaceAge; break;
} }
case xpmpDataType_Radar: case xpmpDataType_Radar:
{ {
if (plane->radarAge != now) if (plane->radarAge != now)
{ {
XPMPPlaneCallbackResult result = result = plane->dataFunc(plane, inDataType, &plane->radar, plane->ref);
plane->dataFunc(plane, inDataType, &plane->radar, plane->ref);
if (result == xpmpData_NewData) if (result == xpmpData_NewData)
plane->radarAge = now; plane->radarAge = now;
} }
XPMPPlaneRadar_t * radD = (XPMPPlaneRadar_t *) outData; XPMPPlaneRadar_t * radD = (XPMPPlaneRadar_t *) outData;
memcpy(radD, &plane->radar, XPMP_TMIN(radD->size, plane->radar.size)); memcpy(radD, &plane->radar, XPMP_TMIN(radD->size, plane->radar.size));
return plane->radarAge; break;
} }
} }
return -1; return result;
} }
XPMPPlanePtr XPMPPlaneIsValid(XPMPPlaneID inID, XPMPPlaneVector::iterator * outIter) XPMPPlanePtr XPMPPlaneIsValid(XPMPPlaneID inID, XPMPPlaneVector::iterator * outIter)

View File

@@ -345,6 +345,8 @@ int OBJ_LoadModel(const char * inFilePath)
tex_path += sObjects.back().obj.texture; tex_path += sObjects.back().obj.texture;
tex_path += ".png"; tex_path += ".png";
sObjects.back().texnum = OBJ_LoadTexture(tex_path.c_str(), false); sObjects.back().texnum = OBJ_LoadTexture(tex_path.c_str(), false);
if(sObjects.back().texnum == 0)
printf("WARNING: %s failed to load for %s.\n", tex_path.c_str(),inFilePath);
tex_path = path; tex_path = path;
p = tex_path.find_last_of("\\:/");//XPLMGetDirectorySeparator()); p = tex_path.find_last_of("\\:/");//XPLMGetDirectorySeparator());