color.h
来自「CS作弊器源代码,用易语言编写...简单适用,适合新人!~~~~」· C头文件 代码 · 共 45 行
H
45 行
#ifndef COLOR_H
#define COLOR_H
#include "stringfinder.h"
#include <vector>
#include <assert.h>
//====================================================================
struct ColorEntry
{
DWORD r,g,b,a;
DWORD compiled;
float fr,fg,fb;
float onebased_r,onebased_g,onebased_b,onebased_a;
ColorEntry():r(255),g(255),b(255),a(255)
,fr(1.0),fg(1.0),fb(1.0)
,onebased_r(1.0),onebased_g(1.0),onebased_b(1.0),onebased_a(1.0)
,compiled(0xFFFFFFFF){}
// fills missing fields from the r,g,b,a int components
void fill_missing();
};
//====================================================================
class ColorManager
{
public:
ColorManager(){ init(); }
void set(char* name, char* red, char* green, char* blue, char* alpha);
// see init() for valid indexes
ColorEntry* get(unsigned int index){ assert(index<list.size()); return &(list[index]); }
private:
StringFinder indexes;
std::vector<ColorEntry> list;
int insertpos;
void add(const char* name,int r, int g, int b, int a=255);
void init();
};
// Color Manager
extern ColorManager colorList;
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?