OpenClonk
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

◆ GenerateRandomPlayerColor()

DWORD GenerateRandomPlayerColor ( int32_t  iTry)

Definition at line 32 of file C4PlayerInfoConflicts.cpp.

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

References C4RGB, and UnsyncedRandom().

Here is the call graph for this function: