hedgewars/uMisc.pas
changeset 3516 a8c673657b79
parent 3513 f589230fa21b
child 3533 03892fb97ab3
equal deleted inserted replaced
3510:23145a950eae 3516:a8c673657b79
   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+/';