hedgewars/uMisc.pas
changeset 3513 f589230fa21b
parent 3464 cdb0ddeb38ba
child 3533 03892fb97ab3
equal deleted inserted replaced
3512:6a8b5f313190 3513:f589230fa21b
   504 SetTextureParameters(enableClamp);
   504 SetTextureParameters(enableClamp);
   505 end;
   505 end;
   506 
   506 
   507 procedure FreeTexture(tex: PTexture);
   507 procedure FreeTexture(tex: PTexture);
   508 begin
   508 begin
   509 if tex <> nil then
   509     if tex <> nil then
   510     begin
   510     begin
   511     if tex^.NextTexture <> nil then tex^.NextTexture^.PrevTexture:= tex^.PrevTexture;
   511         if tex^.NextTexture <> nil then 
   512     if tex^.PrevTexture <> nil then tex^.PrevTexture^.NextTexture:= tex^.NextTexture
   512             tex^.NextTexture^.PrevTexture:= tex^.PrevTexture;
   513     else TextureList:= tex^.NextTexture;
   513         if tex^.PrevTexture <> nil then 
   514     glDeleteTextures(1, @tex^.id);
   514             tex^.PrevTexture^.NextTexture:= tex^.NextTexture
   515     Dispose(tex)
   515         else 
       
   516             TextureList:= tex^.NextTexture;
       
   517         glDeleteTextures(1, @tex^.id);
       
   518         Dispose(tex);
   516     end
   519     end
   517 end;
   520 end;
   518 
   521 
   519 function DecodeBase64(s: shortstring): shortstring;
   522 function DecodeBase64(s: shortstring): shortstring;
   520 const table = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
   523 const table = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';