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

44 lines
1.0 KiB
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;
2021-07-28 03:33:49 -04:00
static Dvar::Var ColorBlind;
2017-01-19 16:23:59 -05:00
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);
2021-07-28 08:40:43 -04:00
static bool Dvar_GetUnpackedColorByName(const char* name, float* color);
2021-07-28 07:48:46 -04:00
static void GetUnpackedColorByNameStub();
2017-01-19 16:23:59 -05:00
static std::vector<DWORD> ColorTable;
};
}