# HG changeset patch
# User unc0rr
# Date 1290015395 -10800
# Node ID e944cc43f7a4ca3151ddb5a29dd2f4d063252dd3
# Parent  64ea345ab655b9324b51ef36943534d7db76058c
Remove uMisc dependency from uRandom

diff -r 64ea345ab655 -r e944cc43f7a4 hedgewars/uKeys.pas
--- a/hedgewars/uKeys.pas	Wed Nov 17 20:28:42 2010 +0300
+++ b/hedgewars/uKeys.pas	Wed Nov 17 20:36:35 2010 +0300
@@ -20,7 +20,7 @@
 
 unit uKeys;
 interface
-uses uConsts, SDLh, uTypes;
+uses SDLh, uTypes;
 
 procedure initModule;
 procedure freeModule;
@@ -82,7 +82,7 @@
 {$ENDIF}
 {$ENDIF}
 implementation
-uses uTeams, uConsole, uMisc, uVariables;
+uses uTeams, uConsole, uMisc, uVariables, uConsts;
 //const KeyNumber = 1024;
 
 var tkbd, tkbdn: TKeyboardState;
diff -r 64ea345ab655 -r e944cc43f7a4 hedgewars/uRandom.pas
--- a/hedgewars/uRandom.pas	Wed Nov 17 20:28:42 2010 +0300
+++ b/hedgewars/uRandom.pas	Wed Nov 17 20:36:35 2010 +0300
@@ -30,12 +30,8 @@
 function  GetRandom: hwFloat; overload;
 function  GetRandom(m: LongWord): LongWord; overload;
 function  rndSign(num: hwFloat): hwFloat;
-{$IFDEF DEBUGFILE}
-procedure DumpBuffer;
-{$ENDIF}
 
 implementation
-uses uMisc;
 
 var cirbuf: array[0..63] of Longword;
     n: byte;
@@ -76,7 +72,6 @@
 
 function GetRandom(m: LongWord): LongWord;
 begin
-TryDo((m > 0),'GetRandom(0) called! Please report this to the developers!',true);
 GetNext;
 GetRandom:= GetNext mod m
 end;
@@ -87,15 +82,6 @@
 rndSign:= num
 end;
 
-{$IFDEF DEBUGFILE}
-procedure DumpBuffer;
-var i: LongInt;
-begin
-for i:= 0 to 63 do
-    AddFileLog('[' + inttostr(i) + '] = ' + inttostr(cirbuf[i]))
-end;
-{$ENDIF}
-
 procedure initModule;
 begin
     n:= 54;