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
5namespace nanommo {
6
7namespace {
8
9constexpr 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
20Color ShirtColor(uint32_t shirt) {
21 return kPlayerColors[shirt % kPlayerColors.size()];
22}
23
24Color PlayerColor(uint32_t id) { return ShirtColor(id - 1); }
25
26} // namespace nanommo
Definition chat.cc:9
Color ShirtColor(uint32_t shirt)
Definition scene.cc:20
Color PlayerColor(uint32_t id)
Definition scene.cc:24