X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;ds=sidebyside;f=Source%2FGameInitDispose.cpp;h=79a6a8de030f85980efbef4bff5d2f3aadcb8ab6;hb=dcfcaa86f46665886448d5aa6766b39c9e1c01b8;hp=0ce61eeb704cbb2a8a4faa017e86e406dc96d2b0;hpb=2d54e57ffa32e0a02013d79be57b8a2f3bc8db05;p=lugaru.git diff --git a/Source/GameInitDispose.cpp b/Source/GameInitDispose.cpp index 0ce61ee..79a6a8d 100644 --- a/Source/GameInitDispose.cpp +++ b/Source/GameInitDispose.cpp @@ -52,7 +52,6 @@ extern float multiplier; extern int netdatanew; extern float mapinfo; extern bool stillloading; -extern ImageRec texture; extern short vRefNum; extern long dirID; extern int mainmenu; @@ -120,10 +119,6 @@ void Dispose() } OPENAL_Close(); - if (texture.data) { - free(texture.data); - } - texture.data = 0; #endif } @@ -170,7 +165,8 @@ void LoadSave(const char *fileName, GLuint *textureid, bool mipmap, GLubyte *arr texdetail = 1; //Load Image - upload_image(ConvertFileName(fileName)); + ImageRec texture; + load_image(ConvertFileName(fileName), texture); texdetail = temptexdetail; int bytesPerPixel = texture.bpp / 8; @@ -569,8 +565,6 @@ void Game::InitGame() stillloading = 1; - texture.data = ( GLubyte* )malloc( 1024 * 1024 * 4 ); - int temptexdetail = texdetail; texdetail = 1; text->LoadFontTexture(":Data:Textures:Font.png");