annotate Engine/Random.h @ 2499:68cdef6879a0

engine folder
author Ritor1
date Fri, 19 Sep 2014 02:57:42 +0600
parents
children
rev   line source
2499
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
1 #pragma once
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
2
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
3
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
4 /* 304 */
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
5 #pragma pack(push, 1)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
6 struct Random
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
7 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
8 //----- (004BE365) --------------------------------------------------------
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
9 inline Random()
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
10 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
11 Initialize(0x5CCE1E47u);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
12 min = 0;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
13 range = 99;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
14 }
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
15
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
16
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
17 void SetRange(int min, int max);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
18 double GetRandom();
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
19 int GetInRange();
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
20 void Initialize(int seed);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
21
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
22 double field_0[5];
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
23 int min;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
24 int range;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
25 };
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
26 #pragma pack(pop)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
27
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
28
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
29
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
30
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
31 extern struct Random *pRnd; // idb