OpenClonk
C4RandomRecord.cpp
Go to the documentation of this file.
1
/*
2
* OpenClonk, http://www.openclonk.org
3
*
4
* Copyright (c) 1998-2000, Matthes Bender
5
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de/
6
* Copyright (c) 2009-2016, The OpenClonk Team and contributors
7
*
8
* Distributed under the terms of the ISC license; see accompanying file
9
* "COPYING" for details.
10
*
11
* "Clonk" is a registered trademark of Matthes Bender, used with permission.
12
* See accompanying file "TRADEMARK" for details.
13
*
14
* To redistribute this file separately, substitute the full license texts
15
* for the above references.
16
*/
17
18
#include "
C4Include.h
"
19
#include "
lib/C4Random.h
"
20
#include "
control/C4Record.h
"
21
22
void
RecordRandom
(uint32_t range, uint32_t val)
23
{
24
RandomCount
++;
25
if
(
Config
.
General
.
DebugRec
)
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
}
Config
C4Config Config
Definition:
C4Config.cpp:930
C4Include.h
RandomCount
int RandomCount
Definition:
C4Random.cpp:27
C4Random.h
RecordRandom
void RecordRandom(uint32_t range, uint32_t val)
Definition:
C4RandomRecord.cpp:22
AddDbgRec
void AddDbgRec(C4RecordChunkType eType, const void *pData, int iSize)
Definition:
C4Record.cpp:32
C4Record.h
C4RCRandom::Val
uint32_t Val
Definition:
C4Record.h:144
RCT_Random
@ RCT_Random
Definition:
C4Record.h:58
C4RCRandom::Cnt
int Cnt
Definition:
C4Record.h:142
C4RCRandom::Range
uint32_t Range
Definition:
C4Record.h:143
C4RCRandom
Definition:
C4Record.h:141
C4ConfigGeneral::DebugRec
int32_t DebugRec
Definition:
C4Config.h:63
C4Config::General
C4ConfigGeneral General
Definition:
C4Config.h:255
openclonk
src
lib
C4RandomRecord.cpp
Generated on Fri May 16 2025 04:33:16 for OpenClonk by
1.9.1