iw4x-client/src/Components/Modules/Colors.hpp

41 lines
902 B
C++
Raw Normal View History

2017-01-20 08:36:52 -05:00
#pragma once
2017-01-19 16:23:59 -05:00
namespace Components
{
class Colors : public Component
{
public:
Colors();
~Colors();
static void Strip(const char* in, char* out, int max);
2018-12-17 08:29:18 -05:00
static std::string Strip(const std::string& in);
2017-01-19 16:23:59 -05:00
static char Add(uint8_t r, uint8_t g, uint8_t b);
private:
struct HsvColor
{
unsigned char h;
unsigned char s;
unsigned char v;
};
static Dvar::Var NewColors;
static DWORD HsvToRgb(HsvColor hsv);
static void UserInfoCopy(char* buffer, const char* name, size_t size);
2017-01-19 16:23:59 -05:00
static void ClientUserinfoChanged();
static char* GetClientName(int localClientNum, int index, char *buf, size_t size);
static void PatchColorLimit(char limit);
2017-04-28 18:18:51 -04:00
static unsigned int ColorIndex(char index);
2017-01-19 16:23:59 -05:00
static void LookupColor(DWORD* color, char index);
static void LookupColorStub();
static char* CleanStrStub(char* string);
static std::vector<DWORD> ColorTable;
};
}