X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FTGALoader.cpp;h=172ed5f1218f7c5b03efa9c06a3405cf37f7967d;hb=e724a1c4bd1f94b55ac1331bedd32c51eebb08d9;hp=89d9b6b0a34d2a009928a8ca5ee57240a17cb11a;hpb=d97c07431d4e451ef1ef64e59ea95eedb4c5e10c;p=lugaru.git diff --git a/Source/TGALoader.cpp b/Source/TGALoader.cpp index 89d9b6b..172ed5f 100644 --- a/Source/TGALoader.cpp +++ b/Source/TGALoader.cpp @@ -28,22 +28,18 @@ extern TGAImageRec texture; 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; - pgame->LoadingScreen(); - } + if(visibleloading) + Game::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 +83,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 +120,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 +132,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 ) {