summaryrefslogtreecommitdiff
path: root/rtl/nds
diff options
context:
space:
mode:
authorsvenbarth <svenbarth@3ad0048d-3df7-0310-abae-a5850022a9f2>2020-08-01 17:26:39 +0000
committersvenbarth <svenbarth@3ad0048d-3df7-0310-abae-a5850022a9f2>2020-08-01 17:26:39 +0000
commit8b7080be2feede35e66572b482110a6ca7d38a75 (patch)
tree77b0ab80b93290089d576cca8f495678f143fea8 /rtl/nds
parentaec139d0014cc6cf3bdd8db0b911dd1dbdd60cdd (diff)
downloadfpc-8b7080be2feede35e66572b482110a6ca7d38a75.tar.gz
- remove local Random() implementations that weren't exported anyway (LongInt <> Integer inside the System unit)
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@45981 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'rtl/nds')
-rw-r--r--rtl/nds/system.pp27
1 files changed, 1 insertions, 26 deletions
diff --git a/rtl/nds/system.pp b/rtl/nds/system.pp
index 5485c5ecb4..994077f39a 100644
--- a/rtl/nds/system.pp
+++ b/rtl/nds/system.pp
@@ -125,43 +125,18 @@ begin
// Boo!
end;
-
-
{*****************************************************************************
ParamStr/Randomize
*****************************************************************************}
-const
- QRAN_SHIFT = 15;
- QRAN_MASK = ((1 shl QRAN_SHIFT) - 1);
- QRAN_MAX = QRAN_MASK;
- QRAN_A = 1664525;
- QRAN_C = 1013904223;
{ set randseed to a new pseudo random value }
procedure randomize;
var
IPC_Timer: array [0..2] of byte absolute $27FF01B;
begin
- RandSeed := (IPC_Timer[0] * 3600) + (IPC_Timer[1] * 60) + IPC_Timer[2];
-end;
-
-function random(): integer;
-begin
- RandSeed := QRAN_A * RandSeed + QRAN_C;
- random := (RandSeed shr 16) and QRAN_MAX;
+ RandSeed := (IPC_Timer[0] * 3600) + (IPC_Timer[1] * 60) + IPC_Timer[2];
end;
-function random(value: integer): integer;
-var
- a: integer;
-begin
- RandSeed := QRAN_A * RandSeed + QRAN_C;
- a := (RandSeed shr 16) and QRAN_MAX;
- random := (a * value) shr 15;
-end;
-
-
-
Function ParamCount: Longint;
Begin
Paramcount:=argc-1