nanoMMO
0.97.8
Building an MMO: The Engineering Series
Loading...
Searching...
No Matches
scene.cc
Go to the documentation of this file.
1
#include "
client/scene.h
"
2
3
#include <array>
4
5
namespace
nanommo
{
6
7
namespace
{
8
9
constexpr
std::array<Color, kShirtColors> kPlayerColors = {{
10
{242, 140, 51, 255},
11
{64, 153, 242, 255},
12
{89, 204, 102, 255},
13
{178, 115, 242, 255},
14
{242, 89, 102, 255},
15
{242, 217, 77, 255},
16
}};
17
18
}
// namespace
19
20
Color
ShirtColor
(uint32_t shirt) {
21
return
kPlayerColors[shirt % kPlayerColors.size()];
22
}
23
24
Color
PlayerColor
(uint32_t
id
) {
return
ShirtColor
(
id
- 1); }
25
26
}
// namespace nanommo
nanommo
Definition
chat.cc:9
nanommo::ShirtColor
Color ShirtColor(uint32_t shirt)
Definition
scene.cc:20
nanommo::PlayerColor
Color PlayerColor(uint32_t id)
Definition
scene.cc:24
scene.h
client
scene.cc
Generated by
1.15.0