hedgewars/uMisc.pas
changeset 2607 dbeaba78e676
parent 2599 c7153d2348f3
child 2619 bc2786a00fb8
equal deleted inserted replaced
2606:ed687a8d081f 2607:dbeaba78e676
   162 function NewTexture(width, height: Longword; buf: Pointer): PTexture;
   162 function NewTexture(width, height: Longword; buf: Pointer): PTexture;
   163 function  Surface2Tex(surf: PSDL_Surface; enableClamp: boolean): PTexture;
   163 function  Surface2Tex(surf: PSDL_Surface; enableClamp: boolean): PTexture;
   164 procedure FreeTexture(tex: PTexture);
   164 procedure FreeTexture(tex: PTexture);
   165 function  toPowerOf2(i: Longword): Longword;
   165 function  toPowerOf2(i: Longword): Longword;
   166 function DecodeBase64(s: shortstring): shortstring;
   166 function DecodeBase64(s: shortstring): shortstring;
   167 function modulo(i: LongInt): LongInt;
       
   168 {$IFNDEF IPHONEOS}
   167 {$IFNDEF IPHONEOS}
   169 procedure MakeScreenshot(s: shortstring);
   168 procedure MakeScreenshot(s: shortstring);
   170 {$ENDIF}
   169 {$ENDIF}
   171 
   170 
   172 function modifyDamage(dmg: Longword): Longword;
   171 function modifyDamage(dmg: Longword): Longword;
   485 	end;
   484 	end;
   486 
   485 
   487 if c < 3 then t:= t - c;
   486 if c < 3 then t:= t - c;
   488 
   487 
   489 byte(DecodeBase64[0]):= t - 1
   488 byte(DecodeBase64[0]):= t - 1
   490 end;
       
   491 
       
   492 function modulo (i: LongInt): LongInt;
       
   493 var result: LongInt;
       
   494 begin
       
   495 if i < 0 then result:= -i
       
   496 else result:= i;
       
   497 exit(result);
       
   498 end;
   489 end;
   499 
   490 
   500 {$IFNDEF IPHONEOS}
   491 {$IFNDEF IPHONEOS}
   501 procedure MakeScreenshot(s: shortstring);
   492 procedure MakeScreenshot(s: shortstring);
   502 const head: array[0..8] of Word = (0, 2, 0, 0, 0, 0, 0, 0, 24);
   493 const head: array[0..8] of Word = (0, 2, 0, 0, 0, 0, 0, 0, 24);