X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FTGALoader.cpp;h=a5eae85dcc61a37f158b9eae5b91c77df3598016;hb=72621d52ae69fa4ecb4329437810d71860ae3ebc;hp=266cdc30ef982dac0daaba1c56fc31ebbb557a58;hpb=2f6f7fe7b9562156a966b6cfd62afb2dc69734f7;p=lugaru.git diff --git a/Source/TGALoader.cpp b/Source/TGALoader.cpp index 266cdc3..a5eae85 100644 --- a/Source/TGALoader.cpp +++ b/Source/TGALoader.cpp @@ -40,7 +40,7 @@ bool upload_image(const unsigned char* filePath, bool hasalpha) #if !PLATFORM_MACOSX // for Windows, just use TGA loader for now - char fileName[ 256]; + char fileName[256]; CopyPascalStringToC( filePath, fileName); /* // change extension to .TGA @@ -84,7 +84,7 @@ bool upload_image(const unsigned char* filePath, bool hasalpha) Rect natbounds; cr = GraphicsImportGetNaturalBounds(gi, &natbounds); - size_t buffersize = 4 * natbounds.bottom * natbounds.right; + //~ size_t buffersize = 4 * natbounds.bottom * natbounds.right; //void* buf = malloc(buffersize); texture.sizeX=natbounds.right; texture.sizeY=natbounds.bottom; @@ -121,7 +121,7 @@ bool upload_image(const unsigned char* filePath, bool hasalpha) GLuint bytesPerPixel; // Temporary Variable bytesPerPixel=texture.bpp/8; imageSize = texture.sizeX * texture.sizeY * bytesPerPixel; - int alltrans=10; + //~ int alltrans=10; for( GLuint i = 0; i < int( imageSize ); i += 4 ) { @@ -133,8 +133,8 @@ bool upload_image(const unsigned char* filePath, bool hasalpha) texture.data[i + 3] = temp; } - int tempplace; - tempplace=0; + //~ int tempplace; + //~ tempplace=0; if(!hasalpha){ for( GLuint i = 0; i < int( imageSize ); i += 4 ) {