X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FTGALoader.cpp;h=a5eae85dcc61a37f158b9eae5b91c77df3598016;hb=72621d52ae69fa4ecb4329437810d71860ae3ebc;hp=89d9b6b0a34d2a009928a8ca5ee57240a17cb11a;hpb=d97c07431d4e451ef1ef64e59ea95eedb4c5e10c;p=lugaru.git diff --git a/Source/TGALoader.cpp b/Source/TGALoader.cpp index 89d9b6b..a5eae85 100644 --- a/Source/TGALoader.cpp +++ b/Source/TGALoader.cpp @@ -29,21 +29,18 @@ extern short vRefNum; extern long dirID; extern bool visibleloading; extern Game * pgame; -extern int loadscreencolor; extern bool LoadImage(const char * fname, TGAImageRec & tex); /********************> LoadTGA() <*****/ bool upload_image(const unsigned char* filePath, bool hasalpha) { - if(visibleloading) { - loadscreencolor=1; + if(visibleloading) pgame->LoadingScreen(); - } #if !PLATFORM_MACOSX // for Windows, just use TGA loader for now - char fileName[ 256]; + char fileName[256]; CopyPascalStringToC( filePath, fileName); /* // change extension to .TGA @@ -87,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; @@ -124,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 ) { @@ -136,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 ) {