hedgewars/uMisc.pas
changeset 2578 ec8e69b23097
parent 2576 2eb7ce1c1f19
child 2587 0dfa56a8513c
equal deleted inserted replaced
2577:275c1b068f68 2578:ec8e69b23097
   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;
   167 {$IFNDEF IPHONEOS}
   168 {$IFNDEF IPHONEOS}
   168 procedure MakeScreenshot(s: shortstring);
   169 procedure MakeScreenshot(s: shortstring);
   169 {$ENDIF}
   170 {$ENDIF}
   170 
   171 
   171 function modifyDamage(dmg: Longword): Longword;
   172 function modifyDamage(dmg: Longword): Longword;
   484 	end;
   485 	end;
   485 
   486 
   486 if c < 3 then t:= t - c;
   487 if c < 3 then t:= t - c;
   487 
   488 
   488 byte(DecodeBase64[0]):= t - 1
   489 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);
   489 end;
   498 end;
   490 
   499 
   491 {$IFNDEF IPHONEOS}
   500 {$IFNDEF IPHONEOS}
   492 procedure MakeScreenshot(s: shortstring);
   501 procedure MakeScreenshot(s: shortstring);
   493 const head: array[0..8] of Word = (0, 2, 0, 0, 0, 0, 0, 0, 24);
   502 const head: array[0..8] of Word = (0, 2, 0, 0, 0, 0, 0, 0, 24);