2010-11-20 10:37:14 +00:00
|
|
|
/* (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. */
|
2010-05-29 07:25:38 +00:00
|
|
|
#ifndef GAME_CLIENT_COMPONENTS_SKINS_H
|
|
|
|
#define GAME_CLIENT_COMPONENTS_SKINS_H
|
|
|
|
#include <base/vmath.h>
|
2010-09-24 11:21:03 +00:00
|
|
|
#include <base/tl/sorted_array.h>
|
2010-05-29 07:25:38 +00:00
|
|
|
#include <game/client/component.h>
|
|
|
|
|
|
|
|
class CSkins : public CComponent
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
// do this better and nicer
|
|
|
|
struct CSkin
|
|
|
|
{
|
|
|
|
int m_OrgTexture;
|
|
|
|
int m_ColorTexture;
|
2010-09-24 11:21:03 +00:00
|
|
|
char m_aName[24];
|
2010-05-29 07:25:38 +00:00
|
|
|
vec3 m_BloodColor;
|
2010-09-24 11:21:03 +00:00
|
|
|
|
|
|
|
bool operator<(const CSkin &Other) { return str_comp(m_aName, Other.m_aName) < 0; }
|
2010-09-18 18:48:49 +00:00
|
|
|
};
|
2010-05-29 07:25:38 +00:00
|
|
|
|
|
|
|
void Init();
|
|
|
|
|
|
|
|
vec4 GetColor(int v);
|
|
|
|
int Num();
|
|
|
|
const CSkin *Get(int Index);
|
|
|
|
int Find(const char *pName);
|
|
|
|
|
|
|
|
private:
|
2010-09-24 11:21:03 +00:00
|
|
|
sorted_array<CSkin> m_aSkins;
|
2010-05-29 07:25:38 +00:00
|
|
|
|
2010-09-24 11:38:03 +00:00
|
|
|
static void SkinScan(const char *pName, int IsDir, int DirType, void *pUser);
|
2010-05-29 07:25:38 +00:00
|
|
|
};
|
|
|
|
#endif
|