Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 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 
23 {
24  return rand();
25 }
26 
27 
28 static BasicRandom gRandomGenerator(42);
29 
31 {
32  // We don't use rand() since it's limited to RAND_MAX
34  return Index % max_index;
35 }
36 
37