blob: 519f452164f2452c7996920470de9a6e6bad971f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
/* If you are missing that file, acquire a complete release at teeworlds.com. */
#ifndef GAME_CLIENT_COMPONENTS_SKINS_H
#define GAME_CLIENT_COMPONENTS_SKINS_H
#include <base/vmath.h>
#include <base/tl/sorted_array.h>
#include <game/client/component.h>
class CSkins : public CComponent
{
public:
// do this better and nicer
struct CSkin
{
int m_OrgTexture;
int m_ColorTexture;
char m_aName[24];
vec3 m_BloodColor;
bool operator<(const CSkin &Other) { return str_comp(m_aName, Other.m_aName) < 0; }
};
void OnInit();
vec3 GetColorV3(int v);
vec4 GetColorV4(int v);
int Num();
const CSkin *Get(int Index);
int Find(const char *pName);
private:
sorted_array<CSkin> m_aSkins;
static int SkinScan(const char *pName, int IsDir, int DirType, void *pUser);
};
#endif
|