Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
IceRandom.cpp
Go to the documentation of this file.
1
8
11
// Precompiled Header
12
#include "
Stdafx.h
"
13
14
15
using namespace
Opcode;
16
17
void
SRand
(
udword
seed)
18
{
19
srand(seed);
20
}
21
22
udword
Rand
()
23
{
24
return
rand();
25
}
26
27
28
static
BasicRandom
gRandomGenerator
(42);
29
30
udword
GetRandomIndex
(
udword
max_index)
31
{
32
// We don't use rand() since it's limited to RAND_MAX
33
udword
Index =
gRandomGenerator
.
Randomize
();
34
return
Index % max_index;
35
}
36
37
src
cmd
collide2
Ice
IceRandom.cpp
Generated on Fri May 29 2015 23:07:12 for Vegastrike 0.5.1 rc1 by
1.8.4