mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-02 00:32:45 +03:00
feat(component): add CCharacterComponent::ComponentOpenFingers
This commit is contained in:
parent
0c77e82e14
commit
ccaf2af8cb
@ -244,6 +244,23 @@ void CCharacterComponent::ComponentCloseFingers(CM2Model* model, COMP_HAND_SLOT
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CCharacterComponent::ComponentOpenFingers(CM2Model* model, COMP_HAND_SLOT handSlot) {
|
||||||
|
uint32_t firstBone;
|
||||||
|
uint32_t lastBone;
|
||||||
|
|
||||||
|
if (handSlot == HAND_LEFT) {
|
||||||
|
firstBone = 13;
|
||||||
|
lastBone = 17;
|
||||||
|
} else {
|
||||||
|
firstBone = 8;
|
||||||
|
lastBone = 12;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (uint32_t boneId = firstBone; boneId <= lastBone; boneId++) {
|
||||||
|
model->UnsetBoneSequence(boneId, 0, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
HTEXTURE CCharacterComponent::CreateTexture(const char* fileName, CStatus* status) {
|
HTEXTURE CCharacterComponent::CreateTexture(const char* fileName, CStatus* status) {
|
||||||
auto texFlags = CGxTexFlags(GxTex_LinearMipNearest, 0, 0, 0, 0, 0, 1);
|
auto texFlags = CGxTexFlags(GxTex_LinearMipNearest, 0, 0, 0, 0, 0, 1);
|
||||||
return TextureCreate(fileName, texFlags, status, 0);
|
return TextureCreate(fileName, texFlags, status, 0);
|
||||||
|
|||||||
@ -51,6 +51,7 @@ class CCharacterComponent {
|
|||||||
static void AddLink(CM2Model* parent, GEOCOMPONENTLINKS link, char const* modelPath, char const* texturePath, int32_t visualID, const ItemDisplayInfoRec* displayRec);
|
static void AddLink(CM2Model* parent, GEOCOMPONENTLINKS link, char const* modelPath, char const* texturePath, int32_t visualID, const ItemDisplayInfoRec* displayRec);
|
||||||
static CCharacterComponent* AllocComponent();
|
static CCharacterComponent* AllocComponent();
|
||||||
static void ComponentCloseFingers(CM2Model* model, COMP_HAND_SLOT handSlot);
|
static void ComponentCloseFingers(CM2Model* model, COMP_HAND_SLOT handSlot);
|
||||||
|
static void ComponentOpenFingers(CM2Model* model, COMP_HAND_SLOT handSlot);
|
||||||
static HTEXTURE CreateTexture(const char* fileName, CStatus* status);
|
static HTEXTURE CreateTexture(const char* fileName, CStatus* status);
|
||||||
static GEOCOMPONENTLINKS GetSheatheLink(SHEATHE_TYPE sheatheType, bool a2);
|
static GEOCOMPONENTLINKS GetSheatheLink(SHEATHE_TYPE sheatheType, bool a2);
|
||||||
static void Initialize();
|
static void Initialize();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user