All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4RandomRecord.cpp File Reference
#include "C4Include.h"
#include "lib/C4Random.h"
#include "control/C4Record.h"
Include dependency graph for C4RandomRecord.cpp:

Go to the source code of this file.


void RecordRandom (uint32_t range, uint32_t val)

Function Documentation

void RecordRandom ( uint32_t  range,
uint32_t  val 

Definition at line 22 of file C4RandomRecord.cpp.

References AddDbgRec(), C4RCRandom::Cnt, Config, C4ConfigGeneral::DebugRec, C4Config::General, RandomCount, C4RCRandom::Range, RCT_Random, and C4RCRandom::Val.

23 {
24  RandomCount++;
26  {
27  // next pseudorandom value
28  C4RCRandom rc;
29  rc.Cnt=RandomCount;
30  rc.Range=range;
31  rc.Val=val;
32  AddDbgRec(RCT_Random, &rc, sizeof(rc));
33  }
34 }
C4Config Config
Definition: C4Config.cpp:833
int RandomCount
Definition: C4Random.cpp:27
C4ConfigGeneral General
Definition: C4Config.h:251
uint32_t Range
Definition: C4Record.h:143
uint32_t Val
Definition: C4Record.h:144
void AddDbgRec(C4RecordChunkType eType, const void *pData, int iSize)
Definition: C4Record.cpp:32
int32_t DebugRec
Definition: C4Config.h:60

Here is the call graph for this function: