OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4PlayerInfoListBox.cpp File Reference
Include dependency graph for C4PlayerInfoListBox.cpp:

Go to the source code of this file.

Functions

DWORD GenerateRandomPlayerColor (int32_t iTry)
 

Function Documentation

DWORD GenerateRandomPlayerColor ( int32_t  iTry)

Definition at line 33 of file C4PlayerInfoConflicts.cpp.

References C4RGB, and UnsyncedRandom().

34 {
35  // generate a random one biased towards max channel luminance
36  // (for greater color difference and less gray-ish colors)
37  return C4RGB(std::min<int>(UnsyncedRandom(302), 256), std::min<int>(UnsyncedRandom(302), 256), std::min<int>(UnsyncedRandom(302), 256));
38 }
uint32_t UnsyncedRandom()
Definition: C4Random.cpp:58
#define C4RGB(r, g, b)
Definition: StdColors.h:28

Here is the call graph for this function: