VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
Color.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <cstdint>
4
5
namespace
VoltMod
6
{
7
8
/**
9
* @brief An RGBA color in the engine's byte order, as `m_clrRender` and glow colors hold it.
10
*
11
* A channel left out stays 255, so `Color{}` is opaque white, `Color{255, 0, 0}` is opaque red
12
* and `Color{.A = 0}` is invisible.
13
*/
14
struct
Color
15
{
16
uint8_t
R
= 255;
17
uint8_t
G
= 255;
18
uint8_t
B
= 255;
19
uint8_t
A
= 255;
20
21
bool
operator==
(
const
Color
&)
const
=
default
;
22
};
23
24
// Generated accessors read and write it in place of the engine's 4-byte Color.
25
static_assert
(
sizeof
(
Color
) == 4);
26
27
}
// namespace VoltMod
VoltMod
Definition
Options.hpp:13
VoltMod::ReadFile
static std::string ReadFile(const std::filesystem::path &path)
Definition
Loader.cpp:56
VoltMod::Color
An RGBA color in the engine's byte order, as m_clrRender and glow colors hold it.
Definition
Color.hpp:15
VoltMod::Color::A
uint8_t A
Definition
Color.hpp:19
VoltMod::Color::G
uint8_t G
Definition
Color.hpp:17
VoltMod::Color::operator==
bool operator==(const Color &) const =default
VoltMod::Color::B
uint8_t B
Definition
Color.hpp:18
VoltMod::Color::R
uint8_t R
Definition
Color.hpp:16
include
VoltMod
Engine
Color.hpp
Generated by
1.9.8