X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FGameInitDispose.cpp;h=8c0917914c4bcb3b9b79d544503292b53f0feefc;hb=12421cc17c6176a16ec18901e02d760ccd0b28ad;hp=ee82765eea5200fcdee808c0b383f57dccbb208a;hpb=9e06cb73424ca3f0eb971350c5dfb3cdaec0d5bf;p=lugaru.git diff --git a/Source/GameInitDispose.cpp b/Source/GameInitDispose.cpp index ee82765..8c09179 100644 --- a/Source/GameInitDispose.cpp +++ b/Source/GameInitDispose.cpp @@ -142,17 +142,15 @@ void Game::deleteGame(){ delete skybox; if(text) delete text; - for(int i=0;i<10;i++){ - if(Mainmenuitems[i])glDeleteTextures( 1, &Mainmenuitems[i] ); - } + glDeleteTextures( 10, &Mainmenuitems[0] ); glDeleteTextures( 1, &cursortexture ); glDeleteTextures( 1, &Maparrowtexture ); glDeleteTextures( 1, &Mapboxtexture ); glDeleteTextures( 1, &Mapcircletexture ); glDeleteTextures( 1, &terraintexture ); glDeleteTextures( 1, &terraintexture2 ); - if(screentexture>0)glDeleteTextures( 1, &screentexture ); - if(screentexture2>0)glDeleteTextures( 1, &screentexture2 ); + glDeleteTextures( 1, &screentexture ); + glDeleteTextures( 1, &screentexture2 ); glDeleteTextures( 1, &hawktexture ); glDeleteTextures( 1, &logotexture ); glDeleteTextures( 1, &loadscreentexture ); @@ -754,10 +752,7 @@ void Game::LoadStuff() for(i=0;i