DDraceNetwork Docs
CSkins7 Class Reference

#include <skins7.h>

Inheritance diagram for CSkins7:
[legend]
Collaboration diagram for CSkins7:
[legend]

Classes

class  CSkin
 
class  CSkinPart
 

Public Types

enum  {
  SKINFLAG_SPECIAL = 1 << 0 , SKINFLAG_STANDARD = 1 << 1 , NUM_COLOR_COMPONENTS = 4 , HAT_NUM = 2 ,
  HAT_OFFSET_SIDE = 2
}
 

Public Member Functions

int Sizeof () const override
 
void OnInit () override
 
const std::vector< CSkin > & GetSkins () const
 
const std::vector< CSkinPart > & GetSkinParts (int Part) const
 
const CSkinPartFindSkinPartOrNullptr (int Part, const char *pName, bool AllowSpecialPart) const
 
const CSkinPartFindDefaultSkinPart (int Part) const
 
const CSkinPartFindSkinPart (int Part, const char *pName, bool AllowSpecialPart) const
 
void RandomizeSkin (int Dummy) const
 
ColorRGBA GetColor (int Value, bool UseAlpha) const
 
ColorRGBA GetTeamColor (int UseCustomColors, int PartColor, int Team, int Part) const
 
bool ValidateSkinParts (char *apPartNames[protocol7::NUM_SKINPARTS], int *pUseCustomColors, int *pPartColors, int GameFlags) const
 
bool SaveSkinfile (const char *pName, int Dummy)
 
bool RemoveSkin (const CSkin *pSkin)
 
IGraphics::CTextureHandle XmasHatTexture () const
 
IGraphics::CTextureHandle BotDecorationTexture () const
 
- Public Member Functions inherited from CComponent
virtual ~CComponent ()
 
virtual int Sizeof () const =0
 
class CGameClientGameClient () const
 
class IClientClient () const
 
virtual void OnStateChange (int NewState, int OldState)
 
virtual void OnConsoleInit ()
 
virtual void OnInit ()
 
virtual void OnShutdown ()
 
virtual void OnReset ()
 
virtual void OnWindowResize ()
 
virtual void OnRefreshSkins ()
 
virtual void OnRender ()
 
virtual void OnNewSnapshot ()
 
virtual void OnRelease ()
 
virtual void OnMapLoad ()
 
virtual void OnMessage (int Msg, void *pRawMsg)
 
virtual bool OnCursorMove (float x, float y, IInput::ECursorType CursorType)
 
virtual bool OnInput (const IInput::CEvent &Event)
 

Static Public Attributes

static const char *const ms_apSkinPartNames [protocol7::NUM_SKINPARTS] = {"body", "marking", "decoration", "hands", "feet", "eyes"}
 
static const char *const ms_apSkinPartNamesLocalized [protocol7::NUM_SKINPARTS] = {Localizable("Body", "skins"), Localizable("Marking", "skins"), Localizable("Decoration", "skins"), Localizable("Hands", "skins"), Localizable("Feet", "skins"), Localizable("Eyes", "skins")}
 
static const char *const ms_apColorComponents [NUM_COLOR_COMPONENTS] = {"hue", "sat", "lgt", "alp"}
 
static char * ms_apSkinNameVariables [NUM_DUMMIES] = {0}
 
static char * ms_apSkinVariables [NUM_DUMMIES][protocol7::NUM_SKINPARTS] = {{0}}
 
static int * ms_apUCCVariables [NUM_DUMMIES][protocol7::NUM_SKINPARTS] = {{0}}
 
static unsigned * ms_apColorVariables [NUM_DUMMIES][protocol7::NUM_SKINPARTS] = {{0}}
 

Private Member Functions

void InitPlaceholderSkinParts ()
 
void LoadXmasHat ()
 
void LoadBotDecoration ()
 
void AddSkinFromConfigVariables (const char *pName, int Dummy)
 

Static Private Member Functions

static int SkinPartScan (const char *pName, int IsDir, int DirType, void *pUser)
 
static int SkinScan (const char *pName, int IsDir, int DirType, void *pUser)
 

Private Attributes

int m_ScanningPart
 
std::vector< CSkinPartm_avSkinParts [protocol7::NUM_SKINPARTS]
 
CSkinPart m_aPlaceholderSkinParts [protocol7::NUM_SKINPARTS]
 
std::vector< CSkinm_vSkins
 
IGraphics::CTextureHandle m_XmasHatTexture
 
IGraphics::CTextureHandle m_BotTexture
 

Additional Inherited Members

- Protected Member Functions inherited from CComponent
class IKernelKernel () const
 
class IEngineEngine () const
 
class IGraphicsGraphics () const
 
class ITextRenderTextRender () const
 
class IInputInput () const
 
class IStorageStorage () const
 
class CUiUi () const
 
class ISoundSound () const
 
class CRenderToolsRenderTools () const
 
class IConfigManagerConfigManager () const
 
class CConfigConfig () const
 
class IConsoleConsole () const
 
class IDemoPlayerDemoPlayer () const
 
class IDemoRecorderDemoRecorder (int Recorder) const
 
class IFavoritesFavorites () const
 
class IServerBrowserServerBrowser () const
 
class CLayersLayers () const
 
class CCollisionCollision () const
 
int64_t time () const
 
float LocalTime () const
 
class IHttpHttp () const
 
- Protected Attributes inherited from CComponent
CGameClientm_pClient
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
SKINFLAG_SPECIAL 
SKINFLAG_STANDARD 
NUM_COLOR_COMPONENTS 
HAT_NUM 
HAT_OFFSET_SIDE 

Member Function Documentation

◆ AddSkinFromConfigVariables()

void CSkins7::AddSkinFromConfigVariables ( const char *  pName,
int  Dummy 
)
private

◆ BotDecorationTexture()

IGraphics::CTextureHandle CSkins7::BotDecorationTexture ( ) const
inline

◆ FindDefaultSkinPart()

const CSkins7::CSkinPart * CSkins7::FindDefaultSkinPart ( int  Part) const

◆ FindSkinPart()

const CSkins7::CSkinPart * CSkins7::FindSkinPart ( int  Part,
const char *  pName,
bool  AllowSpecialPart 
) const

◆ FindSkinPartOrNullptr()

const CSkins7::CSkinPart * CSkins7::FindSkinPartOrNullptr ( int  Part,
const char *  pName,
bool  AllowSpecialPart 
) const

◆ GetColor()

ColorRGBA CSkins7::GetColor ( int  Value,
bool  UseAlpha 
) const

◆ GetSkinParts()

const std::vector< CSkins7::CSkinPart > & CSkins7::GetSkinParts ( int  Part) const

◆ GetSkins()

const std::vector< CSkins7::CSkin > & CSkins7::GetSkins ( ) const

◆ GetTeamColor()

ColorRGBA CSkins7::GetTeamColor ( int  UseCustomColors,
int  PartColor,
int  Team,
int  Part 
) const

◆ InitPlaceholderSkinParts()

void CSkins7::InitPlaceholderSkinParts ( )
private

◆ LoadBotDecoration()

void CSkins7::LoadBotDecoration ( )
private

◆ LoadXmasHat()

void CSkins7::LoadXmasHat ( )
private

◆ OnInit()

void CSkins7::OnInit ( )
overridevirtual

Called to let the components run initialization code.

Reimplemented from CComponent.

◆ RandomizeSkin()

void CSkins7::RandomizeSkin ( int  Dummy) const

◆ RemoveSkin()

bool CSkins7::RemoveSkin ( const CSkin pSkin)

◆ SaveSkinfile()

bool CSkins7::SaveSkinfile ( const char *  pName,
int  Dummy 
)

◆ Sizeof()

int CSkins7::Sizeof ( ) const
inlineoverridevirtual

Gets the size of the non-abstract component.

Implements CComponent.

◆ SkinPartScan()

int CSkins7::SkinPartScan ( const char *  pName,
int  IsDir,
int  DirType,
void *  pUser 
)
staticprivate

◆ SkinScan()

int CSkins7::SkinScan ( const char *  pName,
int  IsDir,
int  DirType,
void *  pUser 
)
staticprivate

◆ ValidateSkinParts()

bool CSkins7::ValidateSkinParts ( char *  apPartNames[protocol7::NUM_SKINPARTS],
int *  pUseCustomColors,
int *  pPartColors,
int  GameFlags 
) const

◆ XmasHatTexture()

IGraphics::CTextureHandle CSkins7::XmasHatTexture ( ) const
inline

Member Data Documentation

◆ m_aPlaceholderSkinParts

CSkinPart CSkins7::m_aPlaceholderSkinParts[protocol7::NUM_SKINPARTS]
private

◆ m_avSkinParts

std::vector<CSkinPart> CSkins7::m_avSkinParts[protocol7::NUM_SKINPARTS]
private

◆ m_BotTexture

IGraphics::CTextureHandle CSkins7::m_BotTexture
private

◆ m_ScanningPart

int CSkins7::m_ScanningPart
private

◆ m_vSkins

std::vector<CSkin> CSkins7::m_vSkins
private

◆ m_XmasHatTexture

IGraphics::CTextureHandle CSkins7::m_XmasHatTexture
private

◆ ms_apColorComponents

const char *const CSkins7::ms_apColorComponents = {"hue", "sat", "lgt", "alp"}
static

◆ ms_apColorVariables

int unsigned * CSkins7::ms_apColorVariables = {{0}}
static

◆ ms_apSkinNameVariables

char * CSkins7::ms_apSkinNameVariables = {0}
static

◆ ms_apSkinPartNames

const char *const CSkins7::ms_apSkinPartNames = {"body", "marking", "decoration", "hands", "feet", "eyes"}
static

◆ ms_apSkinPartNamesLocalized

const char *const CSkins7::ms_apSkinPartNamesLocalized = {Localizable("Body", "skins"), Localizable("Marking", "skins"), Localizable("Decoration", "skins"), Localizable("Hands", "skins"), Localizable("Feet", "skins"), Localizable("Eyes", "skins")}
static

◆ ms_apSkinVariables

char * CSkins7::ms_apSkinVariables = {{0}}
static

◆ ms_apUCCVariables

int * CSkins7::ms_apUCCVariables = {{0}}
static

The documentation for this class was generated from the following files: