![]() |
DDraceNetwork Documentation
|
#include <skins7.h>
Classes | |
| class | CSkinPart |
| class | CSkin |
Public Types | |
| enum | { SKINFLAG_SPECIAL = 1 << 0 , SKINFLAG_STANDARD = 1 << 1 , NUM_COLOR_COMPONENTS = 4 , HAT_NUM = 2 , HAT_OFFSET_SIDE = 2 } |
| typedef std::function< void()> | TSkinLoadedCallback |
Public Member Functions | |
| int | Sizeof () const override |
| void | OnInit () override |
| void | Refresh (TSkinLoadedCallback &&SkinLoadedCallback) |
| std::chrono::nanoseconds | LastRefreshTime () const |
| const std::vector< CSkin > & | GetSkins () const |
| const std::vector< CSkinPart > & | GetSkinParts (int Part) const |
| const CSkinPart * | FindSkinPartOrNullptr (int Part, const char *pName, bool AllowSpecialPart) const |
| const CSkinPart * | FindDefaultSkinPart (int Part) const |
| const CSkinPart * | FindSkinPart (int Part, const char *pName, bool AllowSpecialPart) const |
| void | RandomizeSkin (int Dummy) const |
| ColorRGBA | GetColor (int Value, bool UseAlpha) const |
| void | ApplyColorTo (CTeeRenderInfo::CSixup &SixupRenderInfo, bool UseCustomColors, int Value, int Part) 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 void | OnStateChange (int NewState, int OldState) |
| virtual void | OnConsoleInit () |
| virtual void | OnShutdown () |
| virtual void | OnReset () |
| virtual void | OnWindowResize () |
| virtual void | OnUpdate () |
| 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) |
| virtual bool | OnTouchState (const std::vector< IInput::CTouchFingerState > &vTouchFingerStates) |
| Public Member Functions inherited from CComponentInterfaces | |
| virtual void | OnInterfacesInit (CGameClient *pClient) |
| virtual | ~CComponentInterfaces ()=default |
Static Public Member Functions | |
| static bool | IsSpecialSkin (const char *pName) |
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] = {nullptr} |
| static char * | ms_apSkinVariables [NUM_DUMMIES][protocol7::NUM_SKINPARTS] = {{nullptr}} |
| static int * | ms_apUCCVariables [NUM_DUMMIES][protocol7::NUM_SKINPARTS] = {{nullptr}} |
| static unsigned * | ms_apColorVariables [NUM_DUMMIES][protocol7::NUM_SKINPARTS] = {{nullptr}} |
Private Member Functions | |
| bool | LoadSkinPart (int PartType, const char *pName, int DirType) |
| bool | LoadSkin (const char *pName, int DirType) |
| 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 | |
| std::chrono::nanoseconds | m_LastRefreshTime |
| std::vector< CSkinPart > | m_avSkinParts [protocol7::NUM_SKINPARTS] |
| CSkinPart | m_aPlaceholderSkinParts [protocol7::NUM_SKINPARTS] |
| std::vector< CSkin > | m_vSkins |
| IGraphics::CTextureHandle | m_XmasHatTexture |
| IGraphics::CTextureHandle | m_BotTexture |
Additional Inherited Members | |
| Protected Member Functions inherited from CComponentInterfaces | |
| class CGameClient * | GameClient () const |
| class IClient * | Client () const |
| class IKernel * | Kernel () const |
| class IEngine * | Engine () const |
| class IGraphics * | Graphics () const |
| class ITextRender * | TextRender () const |
| class IInput * | Input () const |
| class IStorage * | Storage () const |
| class CUi * | Ui () const |
| class ISound * | Sound () const |
| class CRenderTools * | RenderTools () const |
| class CRenderMap * | RenderMap () const |
| class IConfigManager * | ConfigManager () const |
| class CConfig * | Config () const |
| class IConsole * | Console () const |
| class IDemoPlayer * | DemoPlayer () const |
| class IDemoRecorder * | DemoRecorder (int Recorder) const |
| class IFavorites * | Favorites () const |
| class IServerBrowser * | ServerBrowser () const |
| class CLayers * | Layers () const |
| class CCollision * | Collision () const |
| int64_t | time () const |
| float | LocalTime () const |
| class IHttp * | Http () const |
| typedef std::function<void()> CSkins7::TSkinLoadedCallback |
| anonymous enum |
|
private |
| void CSkins7::ApplyColorTo | ( | CTeeRenderInfo::CSixup & | SixupRenderInfo, |
| bool | UseCustomColors, | ||
| int | Value, | ||
| int | Part ) const |
|
inline |
| const CSkins7::CSkinPart * CSkins7::FindDefaultSkinPart | ( | int | Part | ) | const |
| const CSkins7::CSkinPart * CSkins7::FindSkinPart | ( | int | Part, |
| const char * | pName, | ||
| bool | AllowSpecialPart ) const |
| const CSkins7::CSkinPart * CSkins7::FindSkinPartOrNullptr | ( | int | Part, |
| const char * | pName, | ||
| bool | AllowSpecialPart ) const |
| ColorRGBA CSkins7::GetColor | ( | int | Value, |
| bool | UseAlpha ) const |
| const std::vector< CSkins7::CSkinPart > & CSkins7::GetSkinParts | ( | int | Part | ) | const |
| const std::vector< CSkins7::CSkin > & CSkins7::GetSkins | ( | ) | const |
| ColorRGBA CSkins7::GetTeamColor | ( | int | UseCustomColors, |
| int | PartColor, | ||
| int | Team, | ||
| int | Part ) const |
|
private |
|
static |
|
inline |
|
private |
|
private |
|
private |
|
private |
|
overridevirtual |
Called to let the components run initialization code.
Reimplemented from CComponent.
| void CSkins7::RandomizeSkin | ( | int | Dummy | ) | const |
| void CSkins7::Refresh | ( | TSkinLoadedCallback && | SkinLoadedCallback | ) |
| bool CSkins7::RemoveSkin | ( | const CSkin * | pSkin | ) |
| bool CSkins7::SaveSkinfile | ( | const char * | pName, |
| int | Dummy ) |
|
inlineoverridevirtual |
Gets the size of the non-abstract component.
Implements CComponent.
|
staticprivate |
|
staticprivate |
| bool CSkins7::ValidateSkinParts | ( | char * | apPartNames[protocol7::NUM_SKINPARTS], |
| int * | pUseCustomColors, | ||
| int * | pPartColors, | ||
| int | GameFlags ) const |
|
inline |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |