wavelength 1.0.0
Loading...
Searching...
No Matches
torsopart.h
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4
5#include "game/avatarpart.h"
6#include "rnd/rndloader.h"
7#include "rnd/rndtex.h"
8
9class Avatar;
10
18class TorsoPart : public AvatarPart {
19public:
28 TorsoPart(int nParent, Avatar *pAvatar);
29
36 ~TorsoPart() override;
37
47 bool Rebuild() override;
48
57 void ReleaseType() override;
58
68 void SetEmblem(const char *pszEmblem);
69
81
83 const char *GetEmblem() const {
84 return mEmblem;
85 }
86
87private:
88 const char *mEmblem;
89 const char *mPendingEmblem;
90 std::unique_ptr<RndTex> mEmblemTex;
91 std::unique_ptr<RndLoader> mEmblemLoader;
92
101 void ApplyEmblem();
102};
AvatarPart(int nPart, int nParent, Avatar *pAvatar)
Construct the model of a part from its entry of the parts array of the avatar entry of the "db" secti...
One of the avatars the game can draw at a time, lent to the AvatarPartSet that shows.
Definition avatar.h:24
void ReleaseType() override
Abandon the loads of the torso and of the emblem.
bool RebuildEmblem()
Take the texture of the emblem SetEmblem() loaded and show it.
void SetEmblem(const char *pszEmblem)
Start loading the file of an emblem.
TorsoPart(int nParent, Avatar *pAvatar)
Construct the model of the torso without an emblem.
~TorsoPart() override
Abandon the load of the emblem and destroy the model.
const char * GetEmblem() const
Definition torsopart.h:83
bool Rebuild() override
Build the meshes of the torso and show the emblem on them.