--- a/hedgewars/uMisc.pas Fri Oct 23 11:11:42 2009 +0000
+++ b/hedgewars/uMisc.pas Fri Oct 23 11:12:01 2009 +0000
@@ -164,6 +164,7 @@
procedure FreeTexture(tex: PTexture);
function toPowerOf2(i: Longword): Longword;
function DecodeBase64(s: shortstring): shortstring;
+function modulo(i: LongInt): LongInt;
{$IFNDEF IPHONEOS}
procedure MakeScreenshot(s: shortstring);
{$ENDIF}
@@ -488,6 +489,14 @@
byte(DecodeBase64[0]):= t - 1
end;
+function modulo (i: LongInt): LongInt;
+var result: LongInt;
+begin
+if i < 0 then result:= -i
+else result:= i;
+exit(result);
+end;
+
{$IFNDEF IPHONEOS}
procedure MakeScreenshot(s: shortstring);
const head: array[0..8] of Word = (0, 2, 0, 0, 0, 0, 0, 0, 24);